mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Safety catch to prevent a possible exception at dying time.
This commit is contained in:
parent
0784ad7246
commit
ea2f71d527
@ -243,7 +243,10 @@ class ChannelStats(callbacks.Privmsg):
|
|||||||
world.flushers.append(self.db.flush)
|
world.flushers.append(self.db.flush)
|
||||||
|
|
||||||
def die(self):
|
def die(self):
|
||||||
world.flushers.remove(self.db.flush)
|
if self.db.flush in world.flushers:
|
||||||
|
world.flushers.remove(self.db.flush)
|
||||||
|
else:
|
||||||
|
self.log.debug('Odd, no flush in flushers: %r', world.flushers)
|
||||||
self.db.close()
|
self.db.close()
|
||||||
callbacks.Privmsg.die(self)
|
callbacks.Privmsg.die(self)
|
||||||
|
|
||||||
|
@ -111,7 +111,10 @@ class Seen(callbacks.Privmsg):
|
|||||||
callbacks.Privmsg.__init__(self)
|
callbacks.Privmsg.__init__(self)
|
||||||
|
|
||||||
def die(self):
|
def die(self):
|
||||||
world.flushers.remove(self.db.flush)
|
if self.db.flush in world.flushers:
|
||||||
|
world.flushers.remove(self.db.flush)
|
||||||
|
else:
|
||||||
|
self.log.debug('Odd, no flush in flushers: %r', world.flushers)
|
||||||
self.db.close()
|
self.db.close()
|
||||||
callbacks.Privmsg.die(self)
|
callbacks.Privmsg.die(self)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user