From 930421c8dd2b8ff2caa4e9cbc824331de7a59468 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Sat, 26 Aug 2023 23:47:29 +0200
Subject: [PATCH] Continued: - if/elif/raise blocks should be separated from
 other logic - tpzo fixed

---
 fba/helpers/cookies.py | 2 +-
 fba/helpers/domain.py  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fba/helpers/cookies.py b/fba/helpers/cookies.py
index eebc7b8..ff2457a 100644
--- a/fba/helpers/cookies.py
+++ b/fba/helpers/cookies.py
@@ -21,7 +21,7 @@ from fba.helpers import domain as domain_helper
 logging.basicConfig(level=logging.INFO)
 logger = logging.getLogger(__name__)
 
-# Cookies stor
+# Cookies storage
 _cookies = {}
 
 def store (domain: str, cookies: dict):
diff --git a/fba/helpers/domain.py b/fba/helpers/domain.py
index 96aa189..9f8c578 100644
--- a/fba/helpers/domain.py
+++ b/fba/helpers/domain.py
@@ -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)
-- 
2.39.5