From 63a082ff34af0d03b20d2f8a045c54c8329aecee Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sun, 4 Aug 2013 08:52:50 +0200 Subject: [PATCH] Debug: Fix @exn. Closes GH-492. --- sandbox/Debug/plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sandbox/Debug/plugin.py b/sandbox/Debug/plugin.py index 67bc76851..8a6ae15d7 100644 --- a/sandbox/Debug/plugin.py +++ b/sandbox/Debug/plugin.py @@ -127,7 +127,10 @@ class Debug(callbacks.Privmsg): Raises the exception matching . """ - exn = getattr(exceptions, name) + if isinstance(__builtins__, dict): + exn = __builtins__[name] + else: + exn = getattr(__builtins__, name) raise exn, msg.prefix exn = wrap(exn, ['text'])