From: Roland Häder Date: Mon, 12 Jun 2023 11:47:21 +0000 (+0200) Subject: Fixed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=99a0b05f2a3cda12931c576dae70d76717f98b62;p=fba.git Fixed: - 'redefined-outer-name' lint fixed - 'bad-indentation ' lint fixed --- diff --git a/fba/fba.py b/fba/fba.py index 05723d1..e422462 100644 --- a/fba/fba.py +++ b/fba/fba.py @@ -122,27 +122,27 @@ def process_domain(domain: str, blocker: str, command: str) -> bool: raise ValueError("Parameter 'command' is empty") if domain.find("*") > 0: - # Try to de-obscure it - row = instances.deobscure("*", domain) + # Try to de-obscure it + row = instances.deobscure("*", domain) - # DEBUG: print(f"DEBUG: row[{type(row)}]='{row}'") - if row is None: - print(f"WARNING: Cannot de-obfucate domain='{domain}' - skipped!") - return False + # DEBUG: print(f"DEBUG: row[{type(row)}]='{row}'") + if row is None: + print(f"WARNING: Cannot de-obfucate domain='{domain}' - skipped!") + return False - # DEBUG: print(f"DEBUG: domain='{domain}' de-obscured to '{row[0]}'") - domain = row[0] + # DEBUG: print(f"DEBUG: domain='{domain}' de-obscured to '{row[0]}'") + domain = row[0] elif domain.find("?") > 0: - # Try to de-obscure it - row = instances.deobscure("?", domain) + # Try to de-obscure it + row = instances.deobscure("?", domain) - # DEBUG: print(f"DEBUG: row[{type(row)}]='{row}'") - if row is None: - print(f"WARNING: Cannot de-obfucate domain='{domain}' - skipped!") - return False + # DEBUG: print(f"DEBUG: row[{type(row)}]='{row}'") + if row is None: + print(f"WARNING: Cannot de-obfucate domain='{domain}' - skipped!") + return False - # DEBUG: print(f"DEBUG: domain='{domain}' de-obscured to '{row[0]}'") - domain = row[0] + # DEBUG: print(f"DEBUG: domain='{domain}' de-obscured to '{row[0]}'") + domain = row[0] if not validators.domain(domain): print(f"WARNING: domain='{domain}' is not a valid domain - skipped!") diff --git a/fba/instances.py b/fba/instances.py index aa912e0..4ed93bf 100644 --- a/fba/instances.py +++ b/fba/instances.py @@ -81,15 +81,15 @@ def has_pending(domain: str) -> bool: elif domain == "": raise ValueError("Parameter 'domain' is empty") - has_pending = False + has = False for key in _pending: # DEBUG: print(f"DEBUG: key='{key}',domain='{domain}',_pending[key]()='{len(_pending[key])}'") if domain in _pending[key]: - has_pending = True + has = True break - # DEBUG: print(f"DEBUG: has_pending='{has_pending}' - EXIT!") - return has_pending + # DEBUG: print(f"DEBUG: has='{has}' - EXIT!") + return has def update_data(domain: str): # DEBUG: print(f"DEBUG: domain='{domain}' - CALLED!")