fix: all my homies hate python 3.11
this commit fixes some issues for 3.11 by using triple-quoted f-strings and avoiding same quote type when nesting inside f-strings Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
1b8c096db6
commit
235fab19e6
2 changed files with 7 additions and 7 deletions
|
@ -11,7 +11,7 @@ _c.optionxform = str
|
|||
|
||||
|
||||
def init_config() -> None:
|
||||
if _validate_config() is False:
|
||||
if not _validate_config():
|
||||
print("Config is invalid.")
|
||||
exit(1)
|
||||
_c.read("config.ini", "utf-8")
|
||||
|
@ -58,7 +58,7 @@ def _validate_config() -> bool:
|
|||
|
||||
try:
|
||||
response = requests.get(
|
||||
f"http://{_c.get("App", "Host")}/status.json", timeout=10
|
||||
f"http://{_c.get('App', 'Host')}/status.json", timeout=10
|
||||
)
|
||||
if response.status_code != 200:
|
||||
raise requests.exceptions.InvalidURL
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue