summaryrefslogtreecommitdiffstats
path: root/Lib/ensurepip/__main__.py
diff options
context:
space:
mode:
authorIgor Filatov <iafilatov@users.noreply.github.com>2017-09-21 10:07:45 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2017-09-21 10:07:45 (GMT)
commit9adda0cdf89432386b7a04444a6199b580d287a1 (patch)
treef43b624c8d4fb6cbfc70ee2070084e5f4dd2c2c2 /Lib/ensurepip/__main__.py
parenta96c96f5dab68d4e611af4b8caefd7268533fd9a (diff)
downloadcpython-9adda0cdf89432386b7a04444a6199b580d287a1.zip
cpython-9adda0cdf89432386b7a04444a6199b580d287a1.tar.gz
cpython-9adda0cdf89432386b7a04444a6199b580d287a1.tar.bz2
bpo-31351: Set return code in ensurepip when pip fails (GH-3626)
Previously ensurepip would always report success, even if the pip installation failed.
Diffstat (limited to 'Lib/ensurepip/__main__.py')
-rw-r--r--Lib/ensurepip/__main__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/ensurepip/__main__.py b/Lib/ensurepip/__main__.py
index 77527d7..03eef0d 100644
--- a/Lib/ensurepip/__main__.py
+++ b/Lib/ensurepip/__main__.py
@@ -1,4 +1,5 @@
import ensurepip
+import sys
if __name__ == "__main__":
- ensurepip._main()
+ sys.exit(ensurepip._main())