From c9337def58809c5048c89f8a9adabf666e901265 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 4 May 2017 10:17:27 +0300 Subject: [PATCH] upip: Treat PyPI redirects as "package not found". PyPI has got too smart and redirects typos, etc. to a similarly-called packages. --- upip/upip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upip/upip.py b/upip/upip.py index 0df85cc8..7b255f05 100644 --- a/upip/upip.py +++ b/upip/upip.py @@ -129,7 +129,7 @@ def url_open(url): if status != b"200": s.close() exc = ValueError(status) - if status == b"404": + if status == b"404" or status == b"301": fatal("Package not found", exc) fatal("Unexpected error querying for package", exc) while 1: