fix usage pf importlib.util.find_spec for newer pythons

* tests/python/ipnbdoctest.py: Here.  It seems importlib
does not load importlib.util anymore.
This commit is contained in:
Alexandre Duret-Lutz 2017-11-22 09:58:29 +01:00
parent cc00898514
commit cec522d56b

View file

@ -22,7 +22,7 @@ except ImportError:
print('Python 3.x is needed to run this script.') print('Python 3.x is needed to run this script.')
sys.exit(77) sys.exit(77)
import importlib import importlib.util
try: try:
importlib.util.find_spec('IPython') importlib.util.find_spec('IPython')
except: except: