Commit 69097315 authored by Thomas Lotze's avatar Thomas Lotze Committed by Jim Fulton

added a comment to explain the intent of the regexp

parent 2caf2ba5
...@@ -149,8 +149,11 @@ class Download(object): ...@@ -149,8 +149,11 @@ class Download(object):
returned and the client code is responsible for cleaning it up. returned and the client code is responsible for cleaning it up.
""" """
# Make sure the drive letter in windows-style file paths isn't
# interpreted as a URL scheme.
if re.match(r"^[A-Za-z]:\\", url): if re.match(r"^[A-Za-z]:\\", url):
url = 'file:' + url url = 'file:' + url
parsed_url = urlparse.urlparse(url, 'file') parsed_url = urlparse.urlparse(url, 'file')
url_scheme, _, url_path = parsed_url[:3] url_scheme, _, url_path = parsed_url[:3]
if url_scheme == 'file': if url_scheme == 'file':
......
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