]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 9 Jun 2023 04:46:23 +0000 (06:46 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 9 Jun 2023 04:46:23 +0000 (06:46 +0200)
- fixed more "Undefined variable"

fba/cache.py
fba/commands.py
fba/fba.py
fba/network.py

index 71ca8223a74a38c6706a66629441d21c98ca3d16..6fac6ce47a9717e1d881e20000d672b9789ad14e 100644 (file)
@@ -36,7 +36,7 @@ def set_all(key: str, rows: list, value: any):
         if isinstance(sub, tuple):
             _cache[key][sub[0]] = value
         else:
-            print(f"WARNING: Unsupported type row[]='{type(row)}'")
+            print(f"WARNING: Unsupported type sub[]='{type(sub)}'")
 
     # DEBUG: print("DEBUG: EXIT!")
 
index ce0687949c70786f1663b87a5332ef75fa0194cb..089dd2eee801eed0edf9cc9dd0e482bd6e06fb03 100644 (file)
@@ -355,7 +355,7 @@ def fetch_fba_rss(args: argparse.Namespace):
                 domains.append(domain)
 
     except BaseException as exception:
-        print(f"ERROR: Cannot fetch feed='{feed}',exception[{type(exception)}]:'{str(exception)}'")
+        print(f"ERROR: Cannot fetch args.feed='{args.feed}',exception[{type(exception)}]:'{str(exception)}'")
         sys.exit(255)
 
     # DEBUG: print(f"DEBUG: domains()={len(domains)}")
index 59a3e8309b28b8627f65512065f0cc2574ce3e82..1062d17d4c76c6e91c8a23ad72b132e3c83fa692 100644 (file)
@@ -627,7 +627,7 @@ def determine_software(domain: str, path: str = None) -> str:
         software = "misskey"
     elif software.find("/") > 0:
         print("WARNING: Spliting of slash:", software)
-        software = tidup_domain(software.split("/")[-1]);
+        software = tidyup_domain(software.split("/")[-1]);
     elif software.find("|") > 0:
         print("WARNING: Spliting of pipe:", software)
         software = tidyup_domain(software.split("|")[0]);
index df883c9e5756068554c48782ee93266a59189c45..78bb30460cdbbb3ebdcea59db448343179f025d0 100644 (file)
@@ -68,8 +68,8 @@ def post_json_api(domain: str, path: str, parameter: str, extra_headers: dict =
     # DEBUG: print(f"DEBUG: Returning data({len(data)})=[]:{type(data)}")
     return data
 
-def send_bot_post(instance: str, blocklist: dict):
-    # DEBUG: print(f"DEBUG: instance={instance},blocklist()={len(blocklist)} - CALLED!")
+def send_bot_post(domain: str, blocklist: dict):
+    # 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 == "":
@@ -77,7 +77,7 @@ def send_bot_post(instance: str, blocklist: dict):
     elif not isinstance(blocklist, dict):
         raise ValueError(f"Parameter blocklist[]='{type(blocklist)}' is not 'dict'")
 
-    message = f"{instance} has blocked the following instances:\n\n"
+    message = f"{domain} has blocked the following instances:\n\n"
     truncated = False
 
     if len(blocklist) > 20:
@@ -152,8 +152,8 @@ def fetch_friendica_blocks(domain: str) -> dict:
     for line in rows:
         # DEBUG: print(f"DEBUG: line='{line}'")
         blocked.append({
-            "domain": tidyup_domain(line.find_all("td")[0].text),
-            "reason": tidyup_reason(line.find_all("td")[1].text)
+            "domain": fba.tidyup_domain(line.find_all("td")[0].text),
+            "reason": fba.tidyup_reason(line.find_all("td")[1].text)
         })
         # DEBUG: print("DEBUG: Next!")