From 478e85a2d83f65a6c8fe0a4dde9bc27ee90f0853 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sun, 26 Jan 2014 14:59:00 +0100 Subject: [PATCH] better detection of editor used --- weboob/tools/application/console.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weboob/tools/application/console.py b/weboob/tools/application/console.py index ac56ff63..64670ca8 100644 --- a/weboob/tools/application/console.py +++ b/weboob/tools/application/console.py @@ -497,8 +497,10 @@ class ConsoleApplication(BaseApplication): content = content.encode(sys.stdin.encoding or locale.getpreferredencoding()) f.write(content) f.flush() - if editor_params is not None and editor in editor_params: - params = editor_params[editor] + if editor_params is not None and os.path.basename(editor) in editor_params: + params = editor_params[os.path.basename(editor)] + else: + params = '' os.system("%s %s %s" % (editor, params, filename)) f.seek(0) text = f.read()