python: update some incorrect or obsolete code
* tests/python/ipnbdoctest.py: Use importlib instead of imp. * tests/python/ltlparse.py: Fix invalid escape sequence.
This commit is contained in:
parent
f6e6099d9b
commit
f6b735234d
2 changed files with 3 additions and 3 deletions
|
|
@ -22,9 +22,9 @@ except ImportError:
|
|||
print('Python 3.x is needed to run this script.')
|
||||
sys.exit(77)
|
||||
|
||||
import imp
|
||||
import importlib
|
||||
try:
|
||||
imp.find_module('IPython')
|
||||
importlib.util.find_spec('IPython')
|
||||
except:
|
||||
print('IPython is needed to run this script.')
|
||||
sys.exit(77)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue