Owner: fix error message when the ImportError comes from the plugin

This commit is contained in:
Valentin Lorentz 2011-03-08 15:18:38 +01:00
parent 8595c177dd
commit c6e54fb1b2

View File

@ -435,7 +435,7 @@ class Owner(callbacks.Plugin):
'to force it to load.' % name.capitalize())
return
except ImportError, e:
if name in str(e):
if str(e).endswith(' ' + name):
irc.error('No plugin named %s exists.' % utils.str.dqrepr(name))
else:
irc.error(str(e))