Fixed test, made sure that a failure in adding lookups doesn't keep the plugin from isntantiating.

This commit is contained in:
Jeremy Fincher 2004-02-13 10:06:27 +00:00
parent f8f977386e
commit 4c681b274c

View File

@ -114,8 +114,11 @@ class Lookup(callbacks.Privmsg):
for (name, value) in group.getValues(fullNames=False):
name = name.lower() # Just in case.
filename = value()
self.addDatabase(name, filename)
self.addCommand(name)
try:
self.addDatabase(name, filename)
self.addCommand(name)
except Exception, e:
self.log.warning('Couldn\'t add lookup %s: %s', name, e)
def _shrink(self, s):
return utils.ellipsisify(s, 50)