better error message.

This commit is contained in:
Jeremy Fincher 2004-10-26 21:12:49 +00:00
parent 11de062c20
commit 0525325289
1 changed files with 9 additions and 5 deletions

View File

@ -111,11 +111,15 @@ def loadPluginClass(irc, module, register=None):
try:
cb = module.Class()
except AttributeError, e:
raise callbacks.Error, 'This plugin module doesn\'t have a "Class" ' \
'attribute to specify which plugin should be ' \
'instantiated. If you didn\'t write this ' \
'plugin, but received it with Supybot, file ' \
'a bug with us about this error. %s.' % e
if 'Class' in str(e):
raise callbacks.Error, \
'This plugin module doesn\'t have a "Class" ' \
'attribute to specify which plugin should be ' \
'instantiated. If you didn\'t write this ' \
'plugin, but received it with Supybot, file ' \
'a bug with us about this error.'
else:
raise
plugin = cb.name()
public = True
if hasattr(cb, 'public'):