From 08ab492c4acc46e20bda07d5d5280fc13c8dbfd1 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 18 May 2005 17:44:28 +0000 Subject: [PATCH] Fixed our NoSuitableDatabase error message not to log a traceback. --- plugins/Owner/plugin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/Owner/plugin.py b/plugins/Owner/plugin.py index ea51841df..171576eb0 100644 --- a/plugins/Owner/plugin.py +++ b/plugins/Owner/plugin.py @@ -42,6 +42,7 @@ import supybot.ircdb as ircdb from supybot.commands import * import supybot.irclib as irclib import supybot.plugin as plugin +import supybot.plugins as plugins import supybot.drivers as drivers import supybot.ircmsgs as ircmsgs import supybot.ircutils as ircutils @@ -229,8 +230,11 @@ class Owner(callbacks.Plugin): except callbacks.Error, e: # This is just an error message. log.warning(str(e)) - except ImportError, e: - log.warning('Failed to load %s: %s.', name, e) + except (plugins.NoSuitableDatabase, ImportError), e: + s = 'Failed to load %s: %s' % (name, e) + if not s.endswith('.'): + s += '.' + log.warning(s) except Exception, e: log.exception('Failed to load %s:', name) else: