From 9ebf980af1a5c225a2de68e5c180338d36c49e07 Mon Sep 17 00:00:00 2001 From: Jingxuan He Date: Wed, 15 Jun 2022 18:01:26 +0200 Subject: [PATCH] Fix a potential wrong operator bug --- third_party/google-endpoints/future/backports/urllib/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/google-endpoints/future/backports/urllib/request.py b/third_party/google-endpoints/future/backports/urllib/request.py index b1545ca0f..e62017061 100644 --- a/third_party/google-endpoints/future/backports/urllib/request.py +++ b/third_party/google-endpoints/future/backports/urllib/request.py @@ -1411,7 +1411,7 @@ def file_open(self, req): 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 req.host not in self.get_names(): raise URLError("file:// scheme is supported only on localhost") else: return self.open_local_file(req)