summaryrefslogtreecommitdiffstats
path: root/testing/zipapp/python
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-04 18:42:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-04 18:42:11 +0000
commit361ff4da262b4891323287049e9e6c5fbe1d01dc (patch)
tree969b376a2c170841758d39ef9516dac65c8b94cd /testing/zipapp/python
parentAdding upstream version 2.17.0. (diff)
downloadpre-commit-96abd1584ed9e10224e1594c80ba574acba24953.tar.xz
pre-commit-96abd1584ed9e10224e1594c80ba574acba24953.zip
Adding upstream version 2.18.1.upstream/2.18.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/zipapp/python')
-rwxr-xr-xtesting/zipapp/python7
1 files changed, 3 insertions, 4 deletions
diff --git a/testing/zipapp/python b/testing/zipapp/python
index 7184a1a..67910fc 100755
--- a/testing/zipapp/python
+++ b/testing/zipapp/python
@@ -1,5 +1,7 @@
#!/usr/bin/env python3
"""A shim executable to put dependencies on sys.path"""
+from __future__ import annotations
+
import argparse
import os.path
import runpy
@@ -36,10 +38,7 @@ def main() -> int:
if sys.platform == 'win32': # https://bugs.python.org/issue19124
import subprocess
- if sys.version_info < (3, 7): # https://bugs.python.org/issue25942
- return subprocess.Popen(cmd).wait()
- else:
- return subprocess.call(cmd)
+ return subprocess.call(cmd)
else:
os.execvp(cmd[0], cmd)