@@ -192,26 +192,26 @@ def update_subchannel_msgs(debug=False):
192
192
for m in msgs:
193
193
#db.append (str (m ).splitlines ())
194
194
s = ' '
195
- if ' msg_type' not in m :
195
+ if ' msg_type' not in m [ ' header ' ] :
196
196
# debug information
197
197
#echo (' skipping a message on sub_channel' ,' WarningMsg' )
198
198
#echo (str (m ))
199
199
continue
200
- elif m [' msg_type' ] == ' status' :
200
+ elif m [' header ' ][ ' msg_type' ] == ' status' :
201
201
continue
202
- elif m [' msg_type' ] == ' stream' :
202
+ elif m [' header ' ][ ' msg_type' ] == ' stream' :
203
203
s = strip_color_escapes (m [' content' ][' data' ])
204
- elif m [' msg_type' ] == ' pyout' :
204
+ elif m [' header ' ][ ' msg_type' ] == ' pyout' :
205
205
s = " Out[%d]: " % m [' content' ][' execution_count' ]
206
206
s += m [' content' ][' data' ][' text/plain' ]
207
- elif m [' msg_type' ] == ' pyin' :
207
+ elif m [' header ' ][ ' msg_type' ] == ' pyin' :
208
208
# TODO : the next line allows us to resend a line to ipython if
209
209
# % doctest_mode is on . In the future, IPython will send the
210
210
# execution_count on subchannel, so this will need to be updated
211
211
# once that happens
212
212
s = " \n In [00]: "
213
213
s += m [' content' ][' code' ].strip ()
214
- elif m [' msg_type' ] == ' pyerr' :
214
+ elif m [' header ' ][ ' msg_type' ] == ' pyerr' :
215
215
c = m [' content' ]
216
216
s = " \n " .join (map (strip_color_escapes,c [' traceback' ]))
217
217
s += c [' ename' ] + " :" + c [' evalue' ]
0 commit comments