Skip to content

Commit

Permalink
Merge pull request #42 from jeffyjefflabs/patch-1
Browse files Browse the repository at this point in the history
Fix crash in check for terminal ipython
  • Loading branch information
minrk authored Mar 30, 2021
2 parents 2b923ab + 2e43863 commit 10364c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wurlitzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def load_ipython_extension(ip):
Use: %load_ext wurlitzer
"""
if not getattr(ip, 'kernel'):
if not getattr(ip, 'kernel', None):
warnings.warn(
"wurlitzer extension doesn't do anything in terminal IPython"
)
Expand All @@ -379,7 +379,7 @@ def unload_ipython_extension(ip):
Use: %unload_ext wurlitzer
"""
if not getattr(ip, 'kernel'):
if not getattr(ip, 'kernel', None):
return
ip.events.unregister('pre_execute', sys_pipes_forever)
ip.events.unregister('post_execute', stop_sys_pipes)
Expand Down

0 comments on commit 10364c5

Please sign in to comment.