Skip to content

Commit c9337de

Browse files
committed
upip: Treat PyPI redirects as "package not found".
PyPI has got too smart and redirects typos, etc. to a similarly-called packages.
1 parent 823b743 commit c9337de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

upip/upip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def url_open(url):
129129
if status != b"200":
130130
s.close()
131131
exc = ValueError(status)
132-
if status == b"404":
132+
if status == b"404" or status == b"301":
133133
fatal("Package not found", exc)
134134
fatal("Unexpected error querying for package", exc)
135135
while 1:

0 commit comments

Comments
 (0)