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,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