Skip to content

Commit

Permalink
Update interface.py
Browse files Browse the repository at this point in the history
  • Loading branch information
k-k-github committed Oct 13, 2023
1 parent 6f09103 commit 4a33263
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions simulator/src/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit 4a33263

Please sign in to comment.