More module: ensure that never return None

This commit is contained in:
nemunaire 2014-10-10 23:15:11 +02:00
parent 6c89f80bcf
commit bd92f64449

View File

@ -226,7 +226,8 @@ 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
res.append(bk) if bk is not None:
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()
res.append(bk) if bk is not None:
res.append(bk)
return res return res