mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
A quick hack to make the test pass on the Mac (similar to the quick hack
to make it pass on Windows:-).
This commit is contained in:
parent
80ea40d858
commit
535c524508
1 changed files with 4 additions and 0 deletions
|
|
@ -15,6 +15,10 @@ else:
|
|||
fname = os.path.abspath(urllib2.__file__).replace('\\', '/')
|
||||
if fname[1:2] == ":":
|
||||
fname = fname[2:]
|
||||
# And more hacking to get it to work on MacOS. This assumes
|
||||
# urllib.pathname2url works, unfortunately...
|
||||
if os.name == 'mac':
|
||||
fname = '/' + fname.replace(':', '/')
|
||||
file_url = "file://%s" % fname
|
||||
f = urllib2.urlopen(file_url)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue