mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 1229908 - ScriptMixin._urlopen() has to use quoted URL to not fail if spaces are contained. r=jlund
This commit is contained in:
parent
0bb2b116eb
commit
58e9f9d3e0
@ -319,7 +319,9 @@ class ScriptMixin(PlatformMixin):
|
||||
.. _urllib2.urlopen:
|
||||
https://docs.python.org/2/library/urllib2.html#urllib2.urlopen
|
||||
"""
|
||||
return urllib2.urlopen(url, **kwargs)
|
||||
# http://bugs.python.org/issue13359 - urllib2 does not automatically quote the URL
|
||||
url_quoted = urllib2.quote(url, safe='%/:=&?~#+!$,;\'@()*[]|')
|
||||
return urllib2.urlopen(url_quoted, **kwargs)
|
||||
|
||||
def _download_file(self, url, file_name):
|
||||
""" Helper script for download_file()
|
||||
|
Loading…
Reference in New Issue
Block a user