From: Roland Häder Date: Fri, 8 Mar 2024 15:43:10 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=83e2848a952fb891a8c99ed5189748102b44f0ec;p=fba.git Continued: - added missing key 'json' (ops!) --- 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