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 committed by James McCoy
parent 3c30463e11
commit 8d8e574d12

View File

@ -432,7 +432,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))