summaryrefslogtreecommitdiffstats
path: root/Lib/ensurepip/__main__.py
diff options
context:
space:
mode:
authorIgor Filatov <iafilatov@users.noreply.github.com>2017-09-25 01:03:24 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2017-09-25 01:03:24 (GMT)
commitcf7197ae43767c4346864e5b41246f628edd9b51 (patch)
tree31b2ad79968e1509a5b09ced5fc344346700640d /Lib/ensurepip/__main__.py
parentda86874a3d8f882d6aedd882b2e27f59b59d6798 (diff)
downloadcpython-cf7197ae43767c4346864e5b41246f628edd9b51.zip
cpython-cf7197ae43767c4346864e5b41246f628edd9b51.tar.gz
cpython-cf7197ae43767c4346864e5b41246f628edd9b51.tar.bz2
[2.7] bpo-31351: Set return code in ensurepip when pip fails (GH-3734)
Previously ensurepip would always report success, even if the pip installation failed. (cherry picked from commit 9adda0cdf89432386b7a04444a6199b580d287a1)
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())