summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/scheduler.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-07-09 22:59:26 -0700
committerLance Stout <lancestout@gmail.com>2012-07-09 22:59:26 -0700
commit99701c947e4cf969c5c7a226cdfd56eaf4f0e0d4 (patch)
treeac2b2e35e9d8a4f52f930b3088582cd283ff89bf /sleekxmpp/xmlstream/scheduler.py
parent1baae1b81ef0765c0f069e67911d7c5224bb4800 (diff)
downloadslixmpp-99701c947e4cf969c5c7a226cdfd56eaf4f0e0d4.tar.gz
slixmpp-99701c947e4cf969c5c7a226cdfd56eaf4f0e0d4.tar.bz2
slixmpp-99701c947e4cf969c5c7a226cdfd56eaf4f0e0d4.tar.xz
slixmpp-99701c947e4cf969c5c7a226cdfd56eaf4f0e0d4.zip
Prevent None from being added to the schedule from a timing issue.
Diffstat (limited to 'sleekxmpp/xmlstream/scheduler.py')
-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,