Skip to content

Commit ec855b8

Browse files
committed
check python before announcing it doesn't exist
1 parent acf6fac commit ec855b8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/shared.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -529,8 +529,11 @@ def check_sanity(force=False):
529529
sys.exit(1)
530530

531531
if not os.path.exists(PYTHON) and not os.path.exists(cmd + '.exe'):
532-
logging.critical('Cannot find %s, check the paths in %s' % (PYTHON, EM_CONFIG))
533-
sys.exit(1)
532+
try:
533+
subprocess.check_call([PYTHON, '--version'], stdout=PIPE, stderr=PIPE)
534+
except:
535+
logging.critical('Cannot find %s, check the paths in %s' % (PYTHON, EM_CONFIG))
536+
sys.exit(1)
534537

535538
if not fastcomp_ok:
536539
logging.critical('failing sanity checks due to previous fastcomp failure')

0 commit comments

Comments
 (0)