]> git.mxchange.org Git - fba.git/blobdiff - fba/helpers/software.py
Continued:
[fba.git] / fba / helpers / software.py
index 3eca4faf83dd479069b449939b15a3e60f6ac3a7..58404bebad6603b9e494d685418054925b4b9170 100644 (file)
@@ -43,7 +43,7 @@ def alias(software: str) -> str:
     elif software == "":
         raise ValueError("Parameter 'software' is empty")
     elif software in _cache["alias"]:
-        logger.debug("Returning cached value='%s' for function 'alias' - EXIT!", _cache["alias"][software])
+        logger.debug("Returning cached alias='%s' - EXIT!", _cache["alias"][software])
         return _cache["alias"][software]
 
     key = software
@@ -169,6 +169,7 @@ def strip_hosted_on(software: str) -> str:
 
 def strip_powered_by(software: str) -> str:
     logger.debug("software='%s' - CALLED!", software)
+
     if not isinstance(software, str):
         raise ValueError(f"Parameter software[]='{type(software)}' is not of type 'str'")
     elif software == "":
@@ -218,8 +219,10 @@ def strip_until(software: str, until: str) -> str:
 def is_relay(software: str) -> bool:
     logger.debug("software='%s'- CALLED!", software)
 
-    if not isinstance(software, str) and software is not None:
+    if not isinstance(software, str):
         raise ValueError(f"software[]='{type(software)}' is not type 'str'")
+    elif software == "":
+        raise ValueError("Parameter 'software' is empty")
 
     found = software in relays