mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +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)
|
||||
|
||||
def _on_zmq_reply(self, stream, msg_list):
|
||||
idents, fed_msg_list = self.session.feed_identities(msg_list)
|
||||
|
||||
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",
|
||||
content={"text": error_message, "name": "stderr"},
|
||||
parent=parent
|
||||
)
|
||||
msg['channel'] = 'iopub'
|
||||
self.write_message(json.dumps(msg, default=date_default))
|
||||
self.log.warn(error_message)
|
||||
|
||||
channel = getattr(stream, 'channel', None)
|
||||
if channel == 'iopub':
|
||||
|
Loading…
Reference in New Issue
Block a user