new option 'backends' to set a restricted list of backends to load

This commit is contained in:
Romain Bignon 2010-06-08 22:24:44 +02:00
commit 110a975735

View file

@ -42,11 +42,17 @@ class Monboob(ConsoleApplication):
'domain': 'weboob.example.org',
'recipient': 'weboob@example.org',
'smtp': 'localhost',
'backends': '',
'html': 0}
def main(self, argv):
self.load_config()
self.load_backends(ICapMessages, storage=self.create_storage())
names = None
if self.config.get('backends'):
names = self.config.get('backends').split()
self.load_backends(ICapMessages, names=names, storage=self.create_storage())
return self.process_command(*argv[1:])