From 99701c947e4cf969c5c7a226cdfd56eaf4f0e0d4 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 9 Jul 2012 22:59:26 -0700 Subject: Prevent None from being added to the schedule from a timing issue. --- sleekxmpp/xmlstream/scheduler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3