From: Roland Häder Date: Mon, 12 Jun 2023 15:11:13 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ddece3965f0a733325acb05309586d130a80830;p=fba.git Continued: - ValueException is wrong, it is ValueError --- diff --git a/fba/csrf.py b/fba/csrf.py index 6efcf23..a7f942d 100644 --- a/fba/csrf.py +++ b/fba/csrf.py @@ -27,7 +27,7 @@ def determine(domain: str, headers: dict) -> dict: elif domain == "": raise ValueError("Parameter 'domain' is empty") elif domain.endswith(".tld"): - raise ValueException(f"domain='{domain}' is a fake domain, please don't crawl them!") + raise ValueError(f"domain='{domain}' is a fake domain, please don't crawl them!") elif not isinstance(headers, dict): raise ValueError(f"Parameter headers[]='{type(headers)}' is not 'dict'") diff --git a/fba/federation.py b/fba/federation.py index 371bf90..54157b6 100644 --- a/fba/federation.py +++ b/fba/federation.py @@ -48,7 +48,7 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path: elif domain == "": raise ValueError("Parameter 'domain' is empty") elif domain.endswith(".tld"): - raise ValueException(f"domain='{domain}' is a fake domain, please don't crawl them!") + raise ValueError(f"domain='{domain}' is a fake domain, please don't crawl them!") elif not isinstance(origin, str) and origin is not None: raise ValueError(f"Parameter origin[]='{type(origin)}' is not 'str'") elif software is None: diff --git a/fba/network.py b/fba/network.py index 821c7ac..5b87c90 100644 --- a/fba/network.py +++ b/fba/network.py @@ -49,7 +49,7 @@ def post_json_api(domain: str, path: str, data: str, headers: dict = {}) -> dict elif domain == "": raise ValueError("Parameter 'domain' is empty") elif domain.endswith(".tld"): - raise ValueException(f"domain='{domain}' is a fake domain, please don't crawl them!") + raise ValueError(f"domain='{domain}' is a fake domain, please don't crawl them!") elif not isinstance(path, str): raise ValueError(f"path[]='{type(path)}' is not 'str'") elif path == "": @@ -134,7 +134,7 @@ def get_json_api(domain: str, path: str, headers: dict, timeout: tuple) -> dict: elif domain == "": raise ValueError("Parameter 'domain' is empty") elif domain.endswith(".tld"): - raise ValueException(f"domain='{domain}' is a fake domain, please don't crawl them!") + raise ValueError(f"domain='{domain}' is a fake domain, please don't crawl them!") elif not isinstance(path, str): raise ValueError(f"path[]='{type(path)}' is not 'str'") elif path == "": @@ -184,7 +184,7 @@ def send_bot_post(domain: str, blocklist: dict): elif domain == "": raise ValueError("Parameter 'domain' is empty") elif domain.endswith(".tld"): - raise ValueException(f"domain='{domain}' is a fake domain, please don't crawl them!") + raise ValueError(f"domain='{domain}' is a fake domain, please don't crawl them!") elif not isinstance(blocklist, dict): raise ValueError(f"Parameter blocklist[]='{type(blocklist)}' is not 'dict'") @@ -231,7 +231,7 @@ def fetch_response(domain: str, path: str, headers: dict, timeout: tuple) -> req elif domain == "": raise ValueError("Parameter 'domain' is empty") elif domain.endswith(".tld"): - raise ValueException(f"domain='{domain}' is a fake domain, please don't crawl them!") + raise ValueError(f"domain='{domain}' is a fake domain, please don't crawl them!") elif not isinstance(path, str): raise ValueError(f"Parameter path[]='{type(path)}' is not 'str'") elif path == "":