@@ -192,26 +192,26 @@ def update_subchannel_msgs(debug=False):
192192 for m in msgs:
193193 #db.append (str (m ).splitlines ())
194194 s = ' '
195- if ' msg_type' not in m :
195+ if ' msg_type' not in m [ ' header ' ] :
196196 # debug information
197197 #echo (' skipping a message on sub_channel' ,' WarningMsg' )
198198 #echo (str (m ))
199199 continue
200- elif m [' msg_type' ] == ' status' :
200+ elif m [' header ' ][ ' msg_type' ] == ' status' :
201201 continue
202- elif m [' msg_type' ] == ' stream' :
202+ elif m [' header ' ][ ' msg_type' ] == ' stream' :
203203 s = strip_color_escapes (m [' content' ][' data' ])
204- elif m [' msg_type' ] == ' pyout' :
204+ elif m [' header ' ][ ' msg_type' ] == ' pyout' :
205205 s = " Out[%d]: " % m [' content' ][' execution_count' ]
206206 s += m [' content' ][' data' ][' text/plain' ]
207- elif m [' msg_type' ] == ' pyin' :
207+ elif m [' header ' ][ ' msg_type' ] == ' pyin' :
208208 # TODO : the next line allows us to resend a line to ipython if
209209 # % doctest_mode is on . In the future, IPython will send the
210210 # execution_count on subchannel, so this will need to be updated
211211 # once that happens
212212 s = " \n In [00]: "
213213 s += m [' content' ][' code' ].strip ()
214- elif m [' msg_type' ] == ' pyerr' :
214+ elif m [' header ' ][ ' msg_type' ] == ' pyerr' :
215215 c = m [' content' ]
216216 s = " \n " .join (map (strip_color_escapes,c [' traceback' ]))
217217 s += c [' ename' ] + " :" + c [' evalue' ]
0 commit comments