From 83e2848a952fb891a8c99ed5189748102b44f0ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 8 Mar 2024 16:43:10 +0100 Subject: [PATCH] Continued: - added missing key 'json' (ops!) --- fba/commands.py | 2 +- fba/networks/misskey.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fba/commands.py b/fba/commands.py index 91e998d..08ff9ff 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -206,7 +206,7 @@ def fetch_bkali(args: argparse.Namespace) -> int: logger.warning("post_json_api() for 'gql.sources.bka.li' returned error message='%s' - EXIT!", fetched["error_message"]) return 100 elif isinstance(fetched["json"], dict) and "error" in fetched["json"] and "message" in fetched["json"]["error"]: - logger.warning("post_json_api() returned error: '%s' - EXIT!", fetched["error"]["message"]) + logger.warning("post_json_api() returned error: '%s' - EXIT!", fetched["json"]["error"]["message"]) return 101 rows = fetched["json"] diff --git a/fba/networks/misskey.py b/fba/networks/misskey.py index 03b038f..e7c7053 100644 --- a/fba/networks/misskey.py +++ b/fba/networks/misskey.py @@ -84,7 +84,7 @@ def fetch_peers(domain: str) -> list: instances.set_last_error(domain, fetched) break elif isinstance(fetched["json"], dict) and "error" in fetched["json"] and "message" in fetched["json"]["error"]: - logger.warning("post_json_api() returned error: '%s'", fetched['error']['message']) + logger.warning("post_json_api() returned error: '%s'", fetched["json"]["error"]["message"]) instances.set_last_error(domain, fetched["json"]["error"]["message"]) break @@ -187,7 +187,7 @@ def fetch_blocks(domain: str) -> list: instances.set_last_error(domain, fetched) break elif isinstance(fetched["json"], dict) and "error" in fetched["json"] and "message" in fetched["json"]["error"]: - logger.warning("post_json_api() returned error: '%s'", fetched['error']['message']) + logger.warning("post_json_api() returned error: '%s'", fetched["json"]["error"]["message"]) instances.set_last_error(domain, fetched["json"]["error"]["message"]) break @@ -275,7 +275,7 @@ def fetch_blocks(domain: str) -> list: instances.set_last_error(domain, fetched) break elif isinstance(fetched["json"], dict) and "error" in fetched["json"] and "message" in fetched["json"]["error"]: - logger.warning("post_json_api() returned error: '%s'", fetched['error']['message']) + logger.warning("post_json_api() returned error: '%s'", fetched["json"]["error"]["message"]) instances.set_last_error(domain, fetched["json"]["error"]["message"]) break -- 2.39.5