Needed to re-raise ArgumentError in order to prevent a spurious test failure.

This commit is contained in:
Jeremy Fincher 2005-02-15 07:40:03 +00:00
parent 90c000793d
commit ada52c729d

View File

@ -73,7 +73,7 @@ class TimeoutError(AssertionError):
def __str__(self): def __str__(self):
return '%r timed out' % self.args[0] return '%r timed out' % self.args[0]
class TestPlugin(callbacks.Privmsg): class TestPlugin(callbacks.Plugin):
def eval(self, irc, msg, args): def eval(self, irc, msg, args):
"""<text> """<text>
@ -83,6 +83,8 @@ class TestPlugin(callbacks.Privmsg):
""" """
try: try:
irc.reply(repr(eval(' '.join(args)))) irc.reply(repr(eval(' '.join(args))))
except callbacks.ArgumentError:
raise
except Exception, e: except Exception, e:
irc.reply(utils.exnToString(e)) irc.reply(utils.exnToString(e))
# Since we know we don't now need the Irc object, we just give None. This # Since we know we don't now need the Irc object, we just give None. This