Commit 722dbd53 authored by Lucas Carvalho's avatar Lucas Carvalho

Changes applied to fix the networkcache.txt

The changes were made in the previous commit:
 - 75a7c904
parent 75a7c904
...@@ -137,9 +137,13 @@ def get_filename_from_url(url): ...@@ -137,9 +137,13 @@ def get_filename_from_url(url):
"""Inspired how pip get filename from url. """Inspired how pip get filename from url.
""" """
url = url.split('#', 1)[0] url = url.split('#', 1)[0]
url = url.split('?', 1)[0]
url = url.rstrip('/') url = url.rstrip('/')
name = posixpath.basename(url) name = posixpath.basename(url)
name_split_list = name.split('?', 1)
if name_split_list[0]:
name = name_split_list[0]
else:
name = name_split_list[1]
assert name, ( assert name, (
'URL %r produced no filename' % url) 'URL %r produced no filename' % url)
return name return name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment