def comeback(msglist): if len(msglist) == 0: return for item in glob.pending[:]: if not process(item): return glob.pending = [] for msg in msglist: if not process(msg): return exported_methods.show_all_statuses(glob.sessid, comeback)
def sessid_comeback(id): glob.sessid = id exported_methods.show_all_statuses(id, comeback)