##// END OF EJS Templates
Backport PR #2926: Don't die if stderr/stdout do not support set_parent() #2925...
MinRK -
Show More
@@ -352,8 +352,14 b' class Kernel(Configurable):'
352 352 # Set the parent message of the display hook and out streams.
353 353 shell.displayhook.set_parent(parent)
354 354 shell.display_pub.set_parent(parent)
355 sys.stdout.set_parent(parent)
356 sys.stderr.set_parent(parent)
355 try:
356 sys.stdout.set_parent(parent)
357 except AttributeError:
358 pass
359 try:
360 sys.stderr.set_parent(parent)
361 except AttributeError:
362 pass
357 363
358 364 # Re-broadcast our input for the benefit of listening clients, and
359 365 # start computing output
@@ -532,13 +538,19 b' class Kernel(Configurable):'
532 538 return
533 539
534 540 self._publish_status(u'busy', parent)
535
541
536 542 # Set the parent message of the display hook and out streams.
537 543 shell = self.shell
538 544 shell.displayhook.set_parent(parent)
539 545 shell.display_pub.set_parent(parent)
540 sys.stdout.set_parent(parent)
541 sys.stderr.set_parent(parent)
546 try:
547 sys.stdout.set_parent(parent)
548 except AttributeError:
549 pass
550 try:
551 sys.stderr.set_parent(parent)
552 except AttributeError:
553 pass
542 554
543 555 # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent)
544 556 # self.iopub_socket.send(pyin_msg)
General Comments 0
You need to be logged in to leave comments. Login now