From 846bf9102b34ad023d20633512002f40a992e9b8 Mon Sep 17 00:00:00 2001 From: James Vega Date: Tue, 7 Sep 2004 19:13:27 +0000 Subject: [PATCH] Correctly report the invalidCommand that set irc.finished. --- src/callbacks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/callbacks.py b/src/callbacks.py index 330ad13f2..409f53f6f 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -527,9 +527,6 @@ class IrcObjectProxy(RichReplyMethods): log.debug('Calling invalidCommands.') for cb in self.irc.callbacks: log.debug('Trying to call %s.invalidCommand.' % cb.name()) - if self.finished: - log.debug('Finished calling invalidCommand: %s.', cb.name()) - return if hasattr(cb, 'invalidCommand'): try: # I think I took out this try/except block because we @@ -537,6 +534,10 @@ class IrcObjectProxy(RichReplyMethods): # other classes won't have firewalled it. Better safe # than sorry, I say. cb.invalidCommand(self, self.msg, self.args) + if self.finished: + log.debug('Finished calling invalidCommand: %s.', + cb.name()) + return except Exception, e: log.exception('Uncaught exception in %s.invalidCommand', cb.name())