Fixed ambiguous error message when some other module is causing the import error.

This commit is contained in:
Jeremy Fincher 2003-10-03 22:28:05 +00:00
parent 4a4595146f
commit 46ebfce1cd
1 changed files with 5 additions and 2 deletions

View File

@ -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)