mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-29471 Don't propagate not existing exit code from runpy.run_module()
packaging_tool.py is terminated with the right exit code from pip anyway with this approach because pip.__main__ calls sys.exit() itself.
This commit is contained in:
@@ -56,11 +56,11 @@ def do_list():
|
||||
|
||||
|
||||
def do_install(pkgs):
|
||||
return run_pip(['install'] + pkgs)
|
||||
run_pip(['install'] + pkgs)
|
||||
|
||||
|
||||
def do_uninstall(pkgs):
|
||||
return run_pip(['uninstall', '-y'] + pkgs)
|
||||
run_pip(['uninstall', '-y'] + pkgs)
|
||||
|
||||
|
||||
def run_pip(args):
|
||||
@@ -143,13 +143,12 @@ def main():
|
||||
rmdir = mkdtemp_ifneeded()
|
||||
|
||||
pkgs = sys.argv[2:]
|
||||
retcode = do_install(pkgs)
|
||||
do_install(pkgs)
|
||||
|
||||
if rmdir is not None:
|
||||
import shutil
|
||||
shutil.rmtree(rmdir)
|
||||
|
||||
|
||||
elif cmd == 'untar':
|
||||
if len(sys.argv) < 2:
|
||||
usage()
|
||||
@@ -159,7 +158,7 @@ def main():
|
||||
if len(sys.argv) < 2:
|
||||
usage()
|
||||
pkgs = sys.argv[2:]
|
||||
retcode = do_uninstall(pkgs)
|
||||
do_uninstall(pkgs)
|
||||
elif cmd == 'pyvenv':
|
||||
opts, args = getopt.getopt(sys.argv[2:], '', ['system-site-packages'])
|
||||
if len(args) != 1:
|
||||
|
||||
Reference in New Issue
Block a user