mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Better error message, bizotch.
This commit is contained in:
parent
d81ca6fa08
commit
0e70115376
@ -102,7 +102,14 @@ def loadPluginModule(name, ignoreDeprecation=False):
|
||||
|
||||
def loadPluginClass(irc, module, register=None):
|
||||
"""Loads the plugin Class from the given module into the given irc."""
|
||||
cb = module.Class()
|
||||
try:
|
||||
cb = module.Class()
|
||||
except AttributeError:
|
||||
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.'
|
||||
name = cb.name()
|
||||
public = True
|
||||
if hasattr(cb, 'public'):
|
||||
|
Loading…
Reference in New Issue
Block a user