1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-08 16:27:24 +01:00

Fixed EM102 (f-string-in-exception): Exception must not use an f-string literal, assign to variable first

This commit is contained in:
Teal Dulcet
2025-01-08 05:22:41 -08:00
parent c357fe83d2
commit 350b5b035a
4 changed files with 16 additions and 8 deletions

View File

@@ -142,7 +142,8 @@ def http_test(url, expected_status, postdata=None, qsargs=None, auth=None):
# return response status code
if r.status_code != expected_status:
r.raise_for_status() # anything but 200
raise OSError(f"Got unexpected status code {r.status_code}.")
msg = f"Got unexpected status code {r.status_code}."
raise OSError(msg)
# define how to run a test