From 8e2551fed1607c211da6adbfdb204486829a916f Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Mon, 15 Nov 2010 21:08:38 +0100 Subject: [PATCH] do not crash if the 'info' command can't find the specified backend --- weboob/applications/weboobcfg/weboobcfg.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/weboob/applications/weboobcfg/weboobcfg.py b/weboob/applications/weboobcfg/weboobcfg.py index 183b9b4a..1a7a463d 100644 --- a/weboob/applications/weboobcfg/weboobcfg.py +++ b/weboob/applications/weboobcfg/weboobcfg.py @@ -168,9 +168,10 @@ class WeboobCfg(ReplApplication): if not line: print 'No backend name was specified.' return - try: - backend = self.weboob.modules_loader.get_or_load_module(line) - except KeyError: + + backend = self.weboob.modules_loader.get_or_load_module(line) + + if not backend: print 'No such backend: "%s"' % line return 1