From c2af5587436374dfb6de4de7e3e1d721151e5a6f Mon Sep 17 00:00:00 2001 From: Christophe Benz Date: Mon, 27 Sep 2010 14:54:38 +0200 Subject: [PATCH] handle case if no backend name is specified --- weboob/applications/weboobcfg/weboobcfg.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/weboob/applications/weboobcfg/weboobcfg.py b/weboob/applications/weboobcfg/weboobcfg.py index e0b7f080..382db19c 100644 --- a/weboob/applications/weboobcfg/weboobcfg.py +++ b/weboob/applications/weboobcfg/weboobcfg.py @@ -115,16 +115,19 @@ class WeboobCfg(ReplApplication): ]) self.format(row) - def do_info(self, name): + def do_info(self, line): """ info NAME Display information about a backend. """ + if not line: + print 'No backend name was specified.' + return try: - backend = self.weboob.modules_loader.get_or_load_module(name) + backend = self.weboob.modules_loader.get_or_load_module(line) except KeyError: - print 'No such backend: "%s"' % name + print 'No such backend: "%s"' % line return 1 print '.------------------------------------------------------------------------------.'