summaryrefslogtreecommitdiff
path: root/Lib/urllib/request.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-07-22 11:03:16 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2014-07-22 11:03:16 +0300
commit525c0ce8f4caad0558212a0c5da7205478dc0bc2 (patch)
tree0e3e118c4dc4e9d90b71951dfa754da75afd35e0 /Lib/urllib/request.py
parent23ea9c8c9158c7407e704ad0116530fd19ad3cb8 (diff)
parent284a4a1bb0496f24e7c0243bbe9fcca7bfa6b2f0 (diff)
downloadcpython-git-525c0ce8f4caad0558212a0c5da7205478dc0bc2.tar.gz
Merge heads
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r--Lib/urllib/request.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 72e91dd5f4..0389f5e853 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1315,7 +1315,7 @@ class FileHandler(BaseHandler):
url = req.selector
if url[:2] == '//' and url[2:3] != '/' and (req.host and
req.host != 'localhost'):
- if not req.host is self.get_names():
+ if not req.host in self.get_names():
raise URLError("file:// scheme is supported only on localhost")
else:
return self.open_local_file(req)