Skip to content

Commit f86623b

Browse files
authored
Merge pull request #463 from iamvalya/master
fix: method flush() in iostream.py
2 parents c958acc + 7278102 commit f86623b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ipykernel/iostream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def flush(self):
338338
339339
send will happen in the background thread
340340
"""
341-
if self.pub_thread.thread.is_alive():
341+
if self.pub_thread and self.pub_thread.thread is not None and self.pub_thread.thread.is_alive():
342342
# request flush on the background thread
343343
self.pub_thread.schedule(self._flush)
344344
# wait for flush to actually get through, if we can.

0 commit comments

Comments
 (0)