1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Fix dumb extension-detecting bugs

This commit is contained in:
Ian Bicking 2009-10-07 17:24:41 -05:00
parent 11fb5da901
commit b21ab6523f

5
pip.py
View file

@ -2241,9 +2241,10 @@ class RequirementSet(object):
ext = splitext(filename)[1]
if not ext:
ext = mimetypes.guess_extension(content_type)
filename += ext
if ext:
filename += ext
if not ext and link.url != resp.geturl():
ext = os.path.splitext(resp.geturl())
ext = os.path.splitext(resp.geturl())[1]
if ext:
filename += ext
temp_location = os.path.join(dir, filename)