From bd066d616e698362da83f672d830f5248c8de31e Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 27 Jan 2004 11:29:54 +0000 Subject: [PATCH] Made do001 more robust against failures loading. --- src/Owner.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Owner.py b/src/Owner.py index 0cf5c7216..cc1b96c7e 100644 --- a/src/Owner.py +++ b/src/Owner.py @@ -137,13 +137,15 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg): m = loadPluginModule(s) loadPluginClass(irc, m) self.log.info('Loading plugins/ plugins.') - for (name, value) in conf.supybot.plugins.getValues(): + for (name, value) in conf.supybot.plugins.getValues(fullNames=False): if value() and irc.getCallback(name) is None: - s = rsplit(name, '.', 1)[-1] - if not irc.getCallback(s): - self.log.info('Loading %s.' % s) - m = loadPluginModule(s) - loadPluginClass(irc, m) + if not irc.getCallback(name): + self.log.info('Loading %s.' % name) + try: + m = loadPluginModule(name) + loadPluginClass(irc, m) + except Exception, e: + log.exception('Failed to load %s:' % name) def disambiguate(self, irc, tokens, ambiguousCommands=None): """Disambiguates the given tokens based on the plugins loaded and