From ff7b8880b93311b2585438d8b27023b6fc794250 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 19 Jun 2023 21:41:46 +0200 Subject: [PATCH] Continued: - wrapped into single quotes --- fba/federation.py | 10 +++++----- fba/network.py | 2 +- fba/networks/lemmy.py | 2 +- fba/networks/misskey.py | 4 ++-- fba/networks/peertube.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fba/federation.py b/fba/federation.py index d966bc3..754e0d6 100644 --- a/fba/federation.py +++ b/fba/federation.py @@ -111,7 +111,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path: print(f"WARNING: Empty instance after tidyup.domain(), domain='{domain}'") continue elif not validators.domain(instance.split("/")[0]): - print(f"WARNING: Bad instance='{instance}' from domain='{domain}',origin='{origin}',software='{software}'") + print(f"WARNING: Bad instance='{instance}' from domain='{domain}',origin='{origin}'") continue elif instance.endswith(".arpa"): print(f"WARNING: instance='{instance}' is a reversed .arpa domain and should not be used generally.") @@ -137,7 +137,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path: # DEBUG: print("DEBUG: EXIT!") def fetch_peers(domain: str, software: str) -> list: - # DEBUG: print(f"DEBUG: domain({len(domain)})={domain},software={software} - CALLED!") + # DEBUG: print(f"DEBUG: domain({len(domain)})='{domain}',software='{software}' - CALLED!") if not isinstance(domain, str): raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'") elif domain == "": @@ -211,7 +211,7 @@ def fetch_peers(domain: str, software: str) -> list: return peers def fetch_nodeinfo(domain: str, path: str = None) -> dict: - # DEBUG: print(f"DEBUG: domain='{domain}',path={path} - CALLED!") + # DEBUG: print(f"DEBUG: domain='{domain}',path='{path}' - CALLED!") if not isinstance(domain, str): raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'") elif domain == "": @@ -352,7 +352,7 @@ def fetch_wellknown_nodeinfo(domain: str) -> dict: return data def fetch_generator_from_path(domain: str, path: str = "/") -> str: - # DEBUG: print(f"DEBUG: domain({len(domain)})={domain},path={path} - CALLED!") + # DEBUG: print(f"DEBUG: domain({len(domain)})='{domain}',path='{path}' - CALLED!") if not isinstance(domain, str): raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'") elif domain == "": @@ -419,7 +419,7 @@ def fetch_generator_from_path(domain: str, path: str = "/") -> str: return software def determine_software(domain: str, path: str = None) -> str: - # DEBUG: print(f"DEBUG: domain({len(domain)})={domain},path={path} - CALLED!") + # DEBUG: print(f"DEBUG: domain({len(domain)})='{domain}',path='{path}' - CALLED!") if not isinstance(domain, str): raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'") elif domain == "": diff --git a/fba/network.py b/fba/network.py index 29ed1db..b4d320d 100644 --- a/fba/network.py +++ b/fba/network.py @@ -181,7 +181,7 @@ def get_json_api(domain: str, path: str, headers: dict, timeout: tuple) -> dict: return json_reply def send_bot_post(domain: str, blocklist: dict): - # DEBUG: print(f"DEBUG: domain={domain},blocklist()={len(blocklist)} - CALLED!") + # DEBUG: print(f"DEBUG: domain='{domain}',blocklist()={len(blocklist)} - CALLED!") if not isinstance(domain, str): raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'") elif domain == "": diff --git a/fba/networks/lemmy.py b/fba/networks/lemmy.py index 78e57c5..5a43afc 100644 --- a/fba/networks/lemmy.py +++ b/fba/networks/lemmy.py @@ -22,7 +22,7 @@ from fba import network from fba.models import instances def fetch_peers(domain: str) -> list: - # DEBUG: print(f"DEBUG: domain({len(domain)})={domain},software='lemmy' - CALLED!") + # DEBUG: print(f"DEBUG: domain({len(domain)})='{domain}',software='lemmy' - CALLED!") if not isinstance(domain, str): raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'") elif domain == "": diff --git a/fba/networks/misskey.py b/fba/networks/misskey.py index bf58924..3fd1c5a 100644 --- a/fba/networks/misskey.py +++ b/fba/networks/misskey.py @@ -27,7 +27,7 @@ from fba.helpers import tidyup from fba.models import instances def fetch_peers(domain: str) -> list: - # DEBUG: print(f"DEBUG: domain({len(domain)})={domain} - CALLED!") + # DEBUG: print(f"DEBUG: domain({len(domain)})='{domain}' - CALLED!") if not isinstance(domain, str): raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'") elif domain == "": @@ -130,7 +130,7 @@ def fetch_blocks(domain: str) -> dict: elif domain == "": raise ValueError("Parameter 'domain' is empty") - # DEBUG: print(f"DEBUG: Fetching misskey blocks from domain={domain}") + # DEBUG: print(f"DEBUG: Fetching misskey blocks from domain='{domain}'") blocklist = { "suspended": [], "blocked" : [] diff --git a/fba/networks/peertube.py b/fba/networks/peertube.py index 26be232..f630642 100644 --- a/fba/networks/peertube.py +++ b/fba/networks/peertube.py @@ -21,7 +21,7 @@ from fba import network from fba.models import instances def fetch_peers(domain: str) -> list: - # DEBUG: print(f"DEBUG: domain({len(domain)})={domain},software='peertube' - CALLED!") + # DEBUG: print(f"DEBUG: domain({len(domain)})='{domain}',software='peertube' - CALLED!") if not isinstance(domain, str): raise ValueError(f"Parameter domain[]='{type(domain)}' is not 'str'") elif domain == "": -- 2.39.5