Skip to content

Commit

Permalink
json_clean zmqshell replies
Browse files Browse the repository at this point in the history
closes gh-535
  • Loading branch information
minrk committed Sep 9, 2011
1 parent 6392ceb commit bc4e206
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions IPython/zmq/zmqshell.py
Expand Up @@ -30,6 +30,7 @@
from IPython.core.magic import MacroToEdit
from IPython.core.payloadpage import install_payload_page
from IPython.utils import io
from IPython.utils.jsonutil import json_clean
from IPython.utils.path import get_py_filename
from IPython.utils.traitlets import Instance, Type, Dict, CBool
from IPython.utils.warn import warn
Expand Down Expand Up @@ -69,7 +70,7 @@ def publish(self, source, data, metadata=None):
content['data'] = data
content['metadata'] = metadata
self.session.send(
self.pub_socket, u'display_data', content,
self.pub_socket, u'display_data', json_clean(content),
parent=self.parent_header
)

Expand Down Expand Up @@ -144,7 +145,7 @@ def _showtraceback(self, etype, evalue, stb):
dh = self.displayhook
# Send exception info over pub socket for other clients than the caller
# to pick up
exc_msg = dh.session.send(dh.pub_socket, u'pyerr', exc_content, dh.parent_header)
exc_msg = dh.session.send(dh.pub_socket, u'pyerr', json_clean(exc_content), dh.parent_header)

# FIXME - Hack: store exception info in shell object. Right now, the
# caller is reading this info after the fact, we need to fix this logic
Expand Down

0 comments on commit bc4e206

Please sign in to comment.