From 46ebfce1cd84526d3138d0f30347f8add5ba3d98 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 3 Oct 2003 22:28:05 +0000 Subject: [PATCH] Fixed ambiguous error message when some other module is causing the import error. --- src/OwnerCommands.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/OwnerCommands.py b/src/OwnerCommands.py index 0ca46f4ec..e45be14d1 100644 --- a/src/OwnerCommands.py +++ b/src/OwnerCommands.py @@ -250,8 +250,11 @@ class OwnerCommands(privmsgs.CapabilityCheckingPrivmsg): return try: module = loadPluginModule(name) - except ImportError: - irc.error(msg, 'No plugin %s exists.' % name) + except ImportError, e: + if name in str(e): + irc.error(msg, 'No plugin %s exists.' % name) + else: + irc.error(msg, debug.exnToString(e)) return loadPluginClass(irc, module) irc.reply(msg, conf.replySuccess)