diff options
| author | 2020-05-07 01:43:25 +0200 | |
|---|---|---|
| committer | 2020-05-07 01:43:25 +0200 | |
| commit | c94c0eaef4ccb64ee3f664ed65837b1f5afd5c59 (patch) | |
| tree | 299065d627154d566984264c1b2dd0f226b4a89c | |
| parent | Use new util function for uploading output. (diff) | |
Continue on failed connections.
Not using skipping the iteration but continuing directly caused
`response_json` being checked but not defined in case of connection errors.
Co-authored-by: MarkKoz <[email protected]>
| -rw-r--r-- | bot/utils/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bot/utils/__init__.py b/bot/utils/__init__.py index 011e41227..41e54c3d5 100644 --- a/bot/utils/__init__.py +++ b/bot/utils/__init__.py @@ -39,6 +39,7 @@ async def send_to_paste_service(http_session: ClientSession, contents: str, *, e f"Failed to connect to paste service at url {paste_url}, " f"trying again ({attempt}/{FAILED_REQUEST_ATTEMPTS})." ) + continue if "message" in response_json: log.warning(f"Paste service returned error {response_json['message']} with status code {response.status}.") return |