Commit cf80a8bd authored by Lucas Carvalho's avatar Lucas Carvalho Committed by Łukasz Nowak

Changes applied to fix the networkcache.txt

The changes were made in the previous commit:
 - 75a7c904
parent 5b1f191e
......@@ -137,9 +137,13 @@ def get_filename_from_url(url):
"""Inspired how pip get filename from url.
"""
url = url.split('#', 1)[0]
url = url.split('?', 1)[0]
url = url.rstrip('/')
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, (
'URL %r produced no filename' % url)
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