summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-10-24 20:42:55 (GMT)
committerGuido van Rossum <guido@python.org>2001-10-24 20:42:55 (GMT)
commite2ae77b8b8a62e648bb1864a9b36ef3280984404 (patch)
treee03ad6f126a16529b2fb43671903e357bcb05835 /Lib/test/test_urllib2.py
parentc6ac8a78f668123ec5c2c3d5a824e7886e9a1c60 (diff)
downloadcpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.zip
cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.gz
cpython-e2ae77b8b8a62e648bb1864a9b36ef3280984404.tar.bz2
SF patch #474590 -- RISC OS support
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r--Lib/test/test_urllib2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 129bf2c..bb4fedb 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -19,6 +19,11 @@ if fname[1:2] == ":":
# urllib.pathname2url works, unfortunately...
if os.name == 'mac':
fname = '/' + fname.replace(':', '/')
+elif os.name == 'riscos':
+ import string
+ fname = os.expand(fname)
+ fname = fname.translate(string.maketrans("/.", "./"))
+
file_url = "file://%s" % fname
f = urllib2.urlopen(file_url)