Just create schedule.schedule/drivers.Twisted.poller without any guard

These module-level variables had historically been created such that reloading
the module wouldn't redefine the variable.  However, none of our code reloads
the modules and the guard to prevent redefining the variable was broken so it
would've been redefined anyway.

Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
James McCoy 2012-05-22 22:11:41 -04:00
parent 14609b3bb2
commit 97e71bd2cd
2 changed files with 2 additions and 8 deletions

View File

@ -155,9 +155,6 @@ class SupyReconnectingFactory(ReconnectingClientFactory, drivers.ServersMixin):
return protocol
Driver = SupyReconnectingFactory
poller = TwistedRunnerDriver()
try:
ignore(poller)
except NameError:
poller = TwistedRunnerDriver()
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:

View File

@ -131,11 +131,8 @@ class Schedule(drivers.IrcDriver):
except Exception, e:
log.exception('Uncaught exception in scheduled function:')
try:
ignore(schedule)
except NameError:
schedule = Schedule()
schedule = Schedule()
addEvent = schedule.addEvent
removeEvent = schedule.removeEvent
rescheduleEvent = schedule.rescheduleEvent