mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
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:
parent
7d99c28cf6
commit
edca443eed
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user