From 4a332639512a4c5ad515499c366a67d79eb2ce21 Mon Sep 17 00:00:00 2001 From: k-k-github Date: Sat, 14 Oct 2023 08:56:59 +0900 Subject: [PATCH] Update interface.py --- simulator/src/interface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simulator/src/interface.py b/simulator/src/interface.py index 513fe63..09564e7 100644 --- a/simulator/src/interface.py +++ b/simulator/src/interface.py @@ -145,6 +145,7 @@ def get(self, url): code = res.status_code except (httpx.TimeoutException, httpx.NetworkError): code = "(failed)" if self.log is not None: self.log.set(logId, code, "") + if code == 403: return None print(f"サーバとの通信に失敗しました。({self.port}-{logId}: {code})") return None def post(self, url, data): @@ -166,6 +167,7 @@ def post(self, url, data): code = res.status_code except (httpx.TimeoutException, httpx.NetworkError): code = "(failed)" if self.log is not None: self.log.set(logId, code, "") + if code == 403: return None print(f"サーバとの通信に失敗しました。({self.port}-{logId}: {code})") return False def release(self, *, safety=True):