##// END OF EJS Templates
Don't die if stderr/stdout do not support set_parent() #2925...
y-p -
Show More
@@ -364,8 +364,14 b' class Kernel(Configurable):'
364 364 shell.displayhook.set_parent(parent)
365 365 shell.display_pub.set_parent(parent)
366 366 shell.data_pub.set_parent(parent)
367 sys.stdout.set_parent(parent)
368 sys.stderr.set_parent(parent)
367 try:
368 sys.stdout.set_parent(parent)
369 except AttributeError:
370 pass
371 try:
372 sys.stderr.set_parent(parent)
373 except AttributeError:
374 pass
369 375
370 376 # Re-broadcast our input for the benefit of listening clients, and
371 377 # start computing output
@@ -567,14 +573,20 b' class Kernel(Configurable):'
567 573 return
568 574
569 575 self._publish_status(u'busy', parent)
570
576
571 577 # Set the parent message of the display hook and out streams.
572 578 shell = self.shell
573 579 shell.displayhook.set_parent(parent)
574 580 shell.display_pub.set_parent(parent)
575 581 shell.data_pub.set_parent(parent)
576 sys.stdout.set_parent(parent)
577 sys.stderr.set_parent(parent)
582 try:
583 sys.stdout.set_parent(parent)
584 except AttributeError:
585 pass
586 try:
587 sys.stderr.set_parent(parent)
588 except AttributeError:
589 pass
578 590
579 591 # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent)
580 592 # self.iopub_socket.send(pyin_msg)
General Comments 0
You need to be logged in to leave comments. Login now