@@ -347,7 +347,7 @@ def _insert_continuation_prompt(self, cursor):
347347 #---------------------------------------------------------------------------
348348 def _handle_clear_output (self , msg ):
349349 """Handle clear output messages."""
350- if not self . _hidden and self . _is_from_this_session (msg ):
350+ if not include_output (msg ):
351351 wait = msg ['content' ].get ('wait' , True )
352352 if wait :
353353 self ._pending_clearoutput = True
@@ -520,7 +520,7 @@ def _handle_execute_result(self, msg):
520520 """ Handle display hook output.
521521 """
522522 self .log .debug ("execute_result: %s" , msg .get ('content' , '' ))
523- if not self ._hidden and self . _is_from_this_session (msg ):
523+ if self .include_output (msg ):
524524 self .flush_clearoutput ()
525525 text = msg ['content' ]['data' ]
526526 self ._append_plain_text (text + '\n ' , before_prompt = True )
@@ -529,7 +529,7 @@ def _handle_stream(self, msg):
529529 """ Handle stdout, stderr, and stdin.
530530 """
531531 self .log .debug ("stream: %s" , msg .get ('content' , '' ))
532- if not self ._hidden and self . _is_from_this_session (msg ):
532+ if self .include_output (msg ):
533533 self .flush_clearoutput ()
534534 self .append_stream (msg ['content' ]['data' ])
535535
@@ -538,7 +538,7 @@ def _handle_shutdown_reply(self, msg):
538538 """
539539 self .log .info ("shutdown: %s" , msg .get ('content' , '' ))
540540 restart = msg .get ('content' , {}).get ('restart' , False )
541- if not self ._hidden and not self ._is_from_this_session (msg ):
541+ if not self ._hidden and not self .from_here (msg ):
542542 # got shutdown reply, request came from session other than ours
543543 if restart :
544544 # someone restarted the kernel, handle it
0 commit comments