From: Roland Häder Date: Tue, 6 Jun 2023 22:26:21 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9b902bda359b5e09d90fea9eaf5a2019ae4a4265;p=fba.git Continued: - commented out debug lines - added commented-out lines, too ;-) - tidyup software name --- diff --git a/fba/fba.py b/fba/fba.py index da9c693..263782f 100644 --- a/fba/fba.py +++ b/fba/fba.py @@ -399,13 +399,13 @@ def get_peers(domain: str, software: str) -> list: raise ValueError(f"software[]={type(software)} is not 'str'") if software == "misskey": - print(f"DEBUG: Invoking misskey.get_peers({domain}) ...") + # DEBUG: print(f"DEBUG: Invoking misskey.get_peers({domain}) ...") return misskey.get_peers(domain) elif software == "lemmy": - print(f"DEBUG: Invoking lemmy.get_peers({domain}) ...") + # DEBUG: print(f"DEBUG: Invoking lemmy.get_peers({domain}) ...") return lemmy.get_peers(domain) elif software == "peertube": - print(f"DEBUG: Invoking peertube.get_peers({domain}) ...") + # DEBUG: print(f"DEBUG: Invoking peertube.get_peers({domain}) ...") return peertube.get_peers(domain) # DEBUG: print(f"DEBUG: Fetching get_peers_url='{get_peers_url}' from '{domain}',software='{software}' ...") @@ -453,6 +453,7 @@ def get_peers(domain: str, software: str) -> list: return peers def post_json_api(domain: str, path: str, parameter: str, extra_headers: dict = {}) -> dict: + # DEBUG: print(f"DEBUG: domain='{domain}',path='{path}',parameter='{parameter}',extra_headers()={len(extra_headers)} - CALLED!") if type(domain) != str: raise ValueError(f"Parameter domain[]={type(domain)} is not 'str'") elif domain == "": @@ -712,7 +713,7 @@ def determine_software(domain: str, path: str = None) -> str: software = "misskey" elif software.find("/") > 0: print("WARNING: Spliting of slash:", software) - software = software.split("/")[-1]; + software = tidup_domain(software.split("/")[-1]); elif software.find("|") > 0: print("WARNING: Spliting of pipe:", software) software = tidyup_domain(software.split("|")[0]);