Owner: improve error on loading missing plugins

This commit is contained in:
GLolol 2014-11-01 11:08:36 -07:00
parent 1b2617bf8e
commit 76a5616bbe

View File

@ -196,7 +196,8 @@ class Owner(callbacks.Plugin):
except ImportError as e: except ImportError as e:
e = str(e) e = str(e)
if e.endswith(name): if e.endswith(name):
s = 'No plugin named %s exists.' % utils.str.dqrepr(name) s = 'Failed to load {0}: No plugin named {0} exists.'.format(
utils.str.dqrepr(name))
elif "No module named 'config'" in e: elif "No module named 'config'" in e:
s = ("Failed to load %s: This plugin is incompatible " s = ("Failed to load %s: This plugin is incompatible "
"with your current Python version. If this error is appearing " "with your current Python version. If this error is appearing "