From 55fafc35c11298cd0469271358c65262cf2935ee Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 9 Nov 2015 16:09:57 +0100 Subject: [PATCH] fix json_encode with python console --- gui/qt/console.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gui/qt/console.py b/gui/qt/console.py index 62e65673e..16ac90195 100644 --- a/gui/qt/console.py +++ b/gui/qt/console.py @@ -213,10 +213,9 @@ class Console(QtGui.QPlainTextEdit): try: # eval is generally considered bad practice. use it wisely! result = eval(command, self.namespace, self.namespace) - result = util.json_encode(result) if result != None: if self.is_json: - util.print_msg(result) + util.print_msg(util.json_encode(result)) else: self.appendPlainText(repr(result)) except SyntaxError: