]> git.mxchange.org Git - fba.git/blobdiff - fba/helpers/domain.py
Continued:
[fba.git] / fba / helpers / domain.py
index 96aa189d4ef7e9c0610a6d86a280929f5ad40b84..9f8c578b6314709683a163ce96f0b2c7d4ecb5fe 100644 (file)
@@ -67,13 +67,13 @@ def is_in_url(domain: str, url: str) -> bool:
 
 def is_wanted(domain: str) -> bool:
     logger.debug("domain='%s' - CALLED!", domain)
-
-    wanted = True
     if not isinstance(domain, str):
         raise ValueError(f"Parameter domain[]='{type(domain)}' is not of type 'str'")
     elif domain == "":
         raise ValueError("Parameter 'domain' is empty")
-    elif domain.lower() != domain:
+
+    wanted = True
+    if domain.lower() != domain:
         wanted = False
     elif not validators.domain(domain.split("/")[0]):
         logger.debug("domain='%s' is not a valid domain name - setting False ...", domain)