Skip to content

Commit

Permalink
shutil.which AttributeError fix
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Nov 14, 2019
1 parent 9470e53 commit 5756dfb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/Jupyter/kernel/clingkernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def _banner_default(self):

def __init__(self, **kwargs):
super(ClingKernel, self).__init__(**kwargs)
clingInPath = shutil.which('cling')
try:
clingInPath = shutil.which('cling')
except AttributeError:
clingInPath = None
if not clingInPath:
from distutils.spawn import find_executable
clingInPath = find_executable('cling')
Expand Down

0 comments on commit 5756dfb

Please sign in to comment.