From 0e701153767c3c6808539696d55cf8f85cc4c039 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 1 Aug 2004 23:19:59 +0000 Subject: [PATCH] Better error message, bizotch. --- src/Owner.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Owner.py b/src/Owner.py index de7b57792..6a5548af6 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -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'):