ability to check caps of a backend against a string (not only a class)

This commit is contained in:
Romain Bignon 2010-08-11 14:58:35 +02:00
commit 7b0c91275f
3 changed files with 11 additions and 3 deletions

View file

@ -258,7 +258,7 @@ class ConsoleApplication(BaseApplication):
if caps is not None:
if not isinstance(caps, (list, tuple, set)):
caps = (caps,)
caps = iter(cap.__name__ for cap in caps)
caps = [(cap if isinstance(cap, (str,unicode)) else cap.__name__) for cap in caps]
weboobcfg.command_backends(*caps)
logging.error(u'You can configure backends using the "weboob-config add" command:\nweboob-config add <name> [options..]')
with open('/dev/null', 'w') as devnull: