diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-22 11:03:16 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-07-22 11:03:16 +0300 |
commit | 525c0ce8f4caad0558212a0c5da7205478dc0bc2 (patch) | |
tree | 0e3e118c4dc4e9d90b71951dfa754da75afd35e0 /Lib/urllib/request.py | |
parent | 23ea9c8c9158c7407e704ad0116530fd19ad3cb8 (diff) | |
parent | 284a4a1bb0496f24e7c0243bbe9fcca7bfa6b2f0 (diff) | |
download | cpython-git-525c0ce8f4caad0558212a0c5da7205478dc0bc2.tar.gz |
Merge heads
Diffstat (limited to 'Lib/urllib/request.py')
-rw-r--r-- | Lib/urllib/request.py | 2 |
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) |