better error message.

This commit is contained in:
Jeremy Fincher 2004-10-26 21:12:49 +00:00
parent 11de062c20
commit 0525325289

View File

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