mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-31351: Set return code in ensurepip when pip fails (GH-3626)
Previously ensurepip would always report success, even if the pip installation failed.
This commit is contained in:
parent
a96c96f5da
commit
9adda0cdf8
6 changed files with 46 additions and 9 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
import argparse
|
||||
import ensurepip
|
||||
import sys
|
||||
|
||||
|
||||
def _main(argv=None):
|
||||
|
@ -23,8 +24,8 @@ def _main(argv=None):
|
|||
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
ensurepip._uninstall_helper(verbosity=args.verbosity)
|
||||
return ensurepip._uninstall_helper(verbosity=args.verbosity)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
_main()
|
||||
sys.exit(_main())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue