mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-11 12:30:51 +08:00
Fix a bug in the code that parses the parent message from the msg_list
This commit is contained in:
parent
acbbc60e09
commit
c47f3d021b
@ -268,16 +268,17 @@ class ZMQChannelsHandler(AuthenticatedZMQStreamHandler):
|
|||||||
self.session.send(stream, msg)
|
self.session.send(stream, msg)
|
||||||
|
|
||||||
def _on_zmq_reply(self, stream, msg_list):
|
def _on_zmq_reply(self, stream, msg_list):
|
||||||
|
idents, fed_msg_list = self.session.feed_identities(msg_list)
|
||||||
|
|
||||||
def write_stderr(error_message):
|
def write_stderr(error_message):
|
||||||
parent = json.loads(msg_list[-3])
|
self.log.warn(error_message)
|
||||||
|
parent = json.loads(fed_msg_list[2])
|
||||||
msg = self.session.msg("stream",
|
msg = self.session.msg("stream",
|
||||||
content={"text": error_message, "name": "stderr"},
|
content={"text": error_message, "name": "stderr"},
|
||||||
parent=parent
|
parent=parent
|
||||||
)
|
)
|
||||||
msg['channel'] = 'iopub'
|
msg['channel'] = 'iopub'
|
||||||
self.write_message(json.dumps(msg, default=date_default))
|
self.write_message(json.dumps(msg, default=date_default))
|
||||||
self.log.warn(error_message)
|
|
||||||
|
|
||||||
channel = getattr(stream, 'channel', None)
|
channel = getattr(stream, 'channel', None)
|
||||||
if channel == 'iopub':
|
if channel == 'iopub':
|
||||||
|
Loading…
Reference in New Issue
Block a user