More module: ensure that never return None
This commit is contained in:
parent
6c89f80bcf
commit
bd92f64449
@ -226,6 +226,7 @@ def cmd_more(msg):
|
|||||||
if nw is not None and not nw.alone:
|
if nw is not None and not nw.alone:
|
||||||
bk = nw
|
bk = nw
|
||||||
SERVERS[msg.server][receiver] = None, bk
|
SERVERS[msg.server][receiver] = None, bk
|
||||||
|
if bk is not None:
|
||||||
res.append(bk)
|
res.append(bk)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
@ -242,5 +243,6 @@ def cmd_next(msg):
|
|||||||
bk = nw
|
bk = nw
|
||||||
SERVERS[msg.server][receiver] = None, bk
|
SERVERS[msg.server][receiver] = None, bk
|
||||||
bk.pop()
|
bk.pop()
|
||||||
|
if bk is not None:
|
||||||
res.append(bk)
|
res.append(bk)
|
||||||
return res
|
return res
|
||||||
|
Loading…
Reference in New Issue
Block a user