if not isinstance(string, str):
raise ValueError(f"Parameter string[]='{type(string)}' is not of type 'str'")
+ elif string == "":
+ raise ValueError("Parameter string is empty")
# All lower-case and strip spaces out + last dot
- string = string.lower().strip().rstrip(".")
+ string = string.lower().strip().rstrip(".").replace("..", ".")
logger.debug("string='%s' - #1", string)
# No port number