From f51bd5b7d429ce81c3b0e9f5d31f0410877bd6a3 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Fri, 15 Oct 2010 18:02:15 +0200 Subject: [PATCH] fix 'list' and 'backends' commands --- weboob/applications/weboobcfg/weboobcfg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/weboob/applications/weboobcfg/weboobcfg.py b/weboob/applications/weboobcfg/weboobcfg.py index 19a6ecd2..89ce4225 100644 --- a/weboob/applications/weboobcfg/weboobcfg.py +++ b/weboob/applications/weboobcfg/weboobcfg.py @@ -31,6 +31,9 @@ class WeboobCfg(ReplApplication): APPNAME = 'weboob-config' VERSION = '0.3' COPYRIGHT = 'Copyright(C) 2010 Christophe Benz, Romain Bignon' + COMMANDS_FORMATTERS = {'backends': 'table', + 'list': 'table', + } def load_default_backends(self): pass @@ -65,7 +68,6 @@ class WeboobCfg(ReplApplication): Show configured backends. """ - self.set_default_formatter('table') for instance_name, name, params in sorted(self.weboob.backends_config.iter_backends()): backend = self.weboob.modules_loader.get_or_load_module(name) row = OrderedDict([('Instance name', instance_name), @@ -107,7 +109,6 @@ class WeboobCfg(ReplApplication): Show available backends. """ caps = line.split() - self.set_default_formatter('table') self.weboob.modules_loader.load_all() for name, backend in sorted(self.weboob.modules_loader.loaded.iteritems()): if caps and not self.caps_included(backend.iter_caps(), caps):