From eb9118133bd83fad60ebdc114f13f40330f74fea Mon Sep 17 00:00:00 2001 From: Christophe Benz Date: Tue, 11 May 2010 15:07:17 +0200 Subject: [PATCH] fix for not Results-API compliant frontends --- weboob/tools/application/console.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/weboob/tools/application/console.py b/weboob/tools/application/console.py index 9870e800..e9f8dd6d 100644 --- a/weboob/tools/application/console.py +++ b/weboob/tools/application/console.py @@ -152,7 +152,10 @@ class ConsoleApplication(BaseApplication): elif command_result is None: return 0 else: - raise Exception('command_result type not expected: %s' % type(command_result)) + try: + print unicode(command_result) + except ValueError: + raise Exception('command_result type not expected: %s' % type(command_result)) _commands = [] def register_command(f, doc_string, register_to=_commands):