From 0525325289369ff82c712779e3171711ee358db6 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 26 Oct 2004 21:12:49 +0000 Subject: [PATCH] better error message. --- src/Owner.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Owner.py b/src/Owner.py index fe2a3204b..190e2100d 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -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'):