Debug: Fix @exn. Closes GH-492.

This commit is contained in:
Valentin Lorentz 2013-08-04 08:52:50 +02:00
parent 1e8dddaa6a
commit 63a082ff34

View File

@ -127,7 +127,10 @@ class Debug(callbacks.Privmsg):
Raises the exception matching <exception name>.
"""
exn = getattr(exceptions, name)
if isinstance(__builtins__, dict):
exn = __builtins__[name]
else:
exn = getattr(__builtins__, name)
raise exn, msg.prefix
exn = wrap(exn, ['text'])