Skip to content

Commit

Permalink
Merge pull request #766 from Carreau/no-loops
Browse files Browse the repository at this point in the history
Don't assume kernels have loops.
  • Loading branch information
Steven Silvester authored Sep 7, 2021
2 parents 3cee9ce + 1483408 commit bd0abb4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ipykernel/zmqshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,9 @@ def _default_exiter(self):
def _update_exit_now(self, change):
"""stop eventloop when exit_now fires"""
if change['new']:
loop = self.kernel.io_loop
loop.call_later(0.1, loop.stop)
if hasattr(self.kernel, 'io_loop'):
loop = self.kernel.io_loop
loop.call_later(0.1, loop.stop)
if self.kernel.eventloop:
exit_hook = getattr(self.kernel.eventloop, 'exit_hook', None)
if exit_hook:
Expand Down

0 comments on commit bd0abb4

Please sign in to comment.