diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-01-21 03:55:40 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-01-21 03:55:40 (GMT) |
commit | 3242577a0875c08a7fb714628a7f0ee58813cece (patch) | |
tree | e323e43adf93835ebe9733c1a65aba68b86e3cb6 /Lib/urllib | |
parent | 77fc1f3c066e244768faa37b52db7415906251f3 (diff) | |
parent | 3800ea9f652817e510a0db27bf124d2b80e7be10 (diff) | |
download | cpython-3242577a0875c08a7fb714628a7f0ee58813cece.zip cpython-3242577a0875c08a7fb714628a7f0ee58813cece.tar.gz cpython-3242577a0875c08a7fb714628a7f0ee58813cece.tar.bz2 |
merge from 3.2
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index c9f2c1d..90dfcff 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1813,6 +1813,8 @@ class URLopener: urlfile = file if file[:1] == '/': urlfile = 'file://' + file + elif file[:2] == './': + raise ValueError("local file url may start with / or file:. Unknown url of type: %s" % url) return addinfourl(open(localname, 'rb'), headers, urlfile) raise URLError('local file error', 'not on local host') |