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>

Conflicts:

	src/schedule.py
This commit is contained in:
James McCoy 2012-05-22 22:11:41 -04:00 committed by Valentin Lorentz
parent 7d99c28cf6
commit edca443eed
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:')
if 'ignore' in globals():
globals()['ignore'](schedule)
else:
schedule = Schedule()
schedule = Schedule()
addEvent = schedule.addEvent
removeEvent = schedule.removeEvent
rescheduleEvent = schedule.rescheduleEvent