mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Added a try/finally statement to the addMsg in __call__ so lastMsg will still get updated if it raises an exception.
This commit is contained in:
parent
6084d00067
commit
20e5bdb50d
@ -61,11 +61,13 @@ class ChannelLogger(irclib.IrcCallback):
|
|||||||
world.flushers.remove(self.flush)
|
world.flushers.remove(self.flush)
|
||||||
|
|
||||||
def __call__(self, irc, msg):
|
def __call__(self, irc, msg):
|
||||||
super(self.__class__, self).__call__(irc, msg)
|
try:
|
||||||
#self.__class__.__bases__[0].__call__(self, irc, msg)
|
super(self.__class__, self).__call__(irc, msg)
|
||||||
if self.lastMsg:
|
if self.lastMsg:
|
||||||
self.laststate.addMsg(irc, self.lastMsg)
|
self.laststate.addMsg(irc, self.lastMsg)
|
||||||
self.lastMsg = msg
|
finally:
|
||||||
|
# We must make this always gets updated.
|
||||||
|
self.lastMsg = msg
|
||||||
|
|
||||||
def reset(self):
|
def reset(self):
|
||||||
for log in self.logs.itervalues():
|
for log in self.logs.itervalues():
|
||||||
|
Loading…
Reference in New Issue
Block a user