Skip to content

Commit

Permalink
fix json_encode with python console
Browse files Browse the repository at this point in the history
  • Loading branch information
ecdsa committed Nov 9, 2015
1 parent 1abc541 commit 55fafc3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gui/qt/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,9 @@ def write(self, text):
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:
Expand Down

0 comments on commit 55fafc3

Please sign in to comment.