mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Made do001 more robust against failures loading.
This commit is contained in:
parent
3bac853c61
commit
bd066d616e
12
src/Owner.py
12
src/Owner.py
@ -137,13 +137,15 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
m = loadPluginModule(s)
|
m = loadPluginModule(s)
|
||||||
loadPluginClass(irc, m)
|
loadPluginClass(irc, m)
|
||||||
self.log.info('Loading plugins/ plugins.')
|
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:
|
if value() and irc.getCallback(name) is None:
|
||||||
s = rsplit(name, '.', 1)[-1]
|
if not irc.getCallback(name):
|
||||||
if not irc.getCallback(s):
|
self.log.info('Loading %s.' % name)
|
||||||
self.log.info('Loading %s.' % s)
|
try:
|
||||||
m = loadPluginModule(s)
|
m = loadPluginModule(name)
|
||||||
loadPluginClass(irc, m)
|
loadPluginClass(irc, m)
|
||||||
|
except Exception, e:
|
||||||
|
log.exception('Failed to load %s:' % name)
|
||||||
|
|
||||||
def disambiguate(self, irc, tokens, ambiguousCommands=None):
|
def disambiguate(self, irc, tokens, ambiguousCommands=None):
|
||||||
"""Disambiguates the given tokens based on the plugins loaded and
|
"""Disambiguates the given tokens based on the plugins loaded and
|
||||||
|
Loading…
Reference in New Issue
Block a user