summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/scheduler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/scheduler.py b/sleekxmpp/xmlstream/scheduler.py
index 70e36f24..f68af081 100644
--- a/sleekxmpp/xmlstream/scheduler.py
+++ b/sleekxmpp/xmlstream/scheduler.py
@@ -172,7 +172,8 @@ class Scheduler(object):
else:
updated = True
self.schedule_lock.acquire()
- self.schedule.append(newtask)
+ if newtask is not None:
+ self.schedule.append(newtask)
finally:
if updated:
self.schedule = sorted(self.schedule,