More miscellaneous cleanup

This commit is contained in:
Anthony Sottile
2020-01-12 21:17:59 -08:00
parent 489d9f9926
commit df40e862f4
33 changed files with 209 additions and 296 deletions

View File

@@ -49,9 +49,8 @@ def _find_by_py_launcher(
if version.startswith('python'):
num = version[len('python'):]
try:
return cmd_output(
'py', f'-{num}', '-c', 'import sys; print(sys.executable)',
)[1].strip()
cmd = ('py', f'-{num}', '-c', 'import sys; print(sys.executable)')
return cmd_output(*cmd)[1].strip()
except CalledProcessError:
pass
return None