@@ -350,7 +350,7 @@ def _insert_continuation_prompt(self, cursor):
350350 #---------------------------------------------------------------------------
351351 def _handle_clear_output (self , msg ):
352352 """Handle clear output messages."""
353- if not self . _hidden and self . _is_from_this_session (msg ):
353+ if include_output (msg ):
354354 wait = msg ['content' ].get ('wait' , True )
355355 if wait :
356356 self ._pending_clearoutput = True
@@ -523,7 +523,7 @@ def _handle_execute_result(self, msg):
523523 """ Handle display hook output.
524524 """
525525 self .log .debug ("execute_result: %s" , msg .get ('content' , '' ))
526- if not self ._hidden and self . _is_from_this_session (msg ):
526+ if self .include_output (msg ):
527527 self .flush_clearoutput ()
528528 text = msg ['content' ]['data' ]
529529 self ._append_plain_text (text + '\n ' , before_prompt = True )
@@ -532,7 +532,7 @@ def _handle_stream(self, msg):
532532 """ Handle stdout, stderr, and stdin.
533533 """
534534 self .log .debug ("stream: %s" , msg .get ('content' , '' ))
535- if not self ._hidden and self . _is_from_this_session (msg ):
535+ if self .include_output (msg ):
536536 self .flush_clearoutput ()
537537 self .append_stream (msg ['content' ]['text' ])
538538
@@ -541,7 +541,7 @@ def _handle_shutdown_reply(self, msg):
541541 """
542542 self .log .info ("shutdown: %s" , msg .get ('content' , '' ))
543543 restart = msg .get ('content' , {}).get ('restart' , False )
544- if not self ._hidden and not self ._is_from_this_session (msg ):
544+ if not self ._hidden and not self .from_here (msg ):
545545 # got shutdown reply, request came from session other than ours
546546 if restart :
547547 # someone restarted the kernel, handle it
0 commit comments