From 95c445223ce4cdeaddff656001cc2a4fb4300592 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Mon, 27 Sep 2010 00:18:04 +0200 Subject: [PATCH] change output of 'backends list' command --- weboob/tools/application/repl.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/weboob/tools/application/repl.py b/weboob/tools/application/repl.py index a28159c5..7c5255ca 100644 --- a/weboob/tools/application/repl.py +++ b/weboob/tools/application/repl.py @@ -495,8 +495,11 @@ class ReplApplication(Cmd, BaseApplication): for backend in given_backends: self.enabled_backends.add(backend) elif action == 'list': - print 'Available: %s' % ', '.join(sorted(backend.name for backend in self.weboob.iter_backends())) - print 'Enabled: %s' % ', '.join(sorted(backend.name for backend in self.enabled_backends)) + enabled_backends_names = set(backend.name for backend in self.enabled_backends) + disabled_backends_names = set(backend.name for backend in self.weboob.iter_backends()) - enabled_backends_names + print 'Enabled: %s' % ', '.join(enabled_backends_names) + if len(disabled_backends_names) > 0: + print 'Disabled: %s' % ', '.join(disabled_backends_names) elif action == 'add': for name in given_backend_names: instname = self.add_backend(name)