##// 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 # Set the parent message of the display hook and out streams.
352 # Set the parent message of the display hook and out streams.
353 shell.displayhook.set_parent(parent)
353 shell.displayhook.set_parent(parent)
354 shell.display_pub.set_parent(parent)
354 shell.display_pub.set_parent(parent)
355 try:
355 sys.stdout.set_parent(parent)
356 sys.stdout.set_parent(parent)
357 except AttributeError:
358 pass
359 try:
356 sys.stderr.set_parent(parent)
360 sys.stderr.set_parent(parent)
361 except AttributeError:
362 pass
357
363
358 # Re-broadcast our input for the benefit of listening clients, and
364 # Re-broadcast our input for the benefit of listening clients, and
359 # start computing output
365 # start computing output
@@ -537,8 +543,14 b' class Kernel(Configurable):'
537 shell = self.shell
543 shell = self.shell
538 shell.displayhook.set_parent(parent)
544 shell.displayhook.set_parent(parent)
539 shell.display_pub.set_parent(parent)
545 shell.display_pub.set_parent(parent)
546 try:
540 sys.stdout.set_parent(parent)
547 sys.stdout.set_parent(parent)
548 except AttributeError:
549 pass
550 try:
541 sys.stderr.set_parent(parent)
551 sys.stderr.set_parent(parent)
552 except AttributeError:
553 pass
542
554
543 # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent)
555 # pyin_msg = self.session.msg(u'pyin',{u'code':code}, parent=parent)
544 # self.iopub_socket.send(pyin_msg)
556 # self.iopub_socket.send(pyin_msg)
General Comments 0
You need to be logged in to leave comments. Login now