diff --git a/proxy/server.py b/proxy/server.py index d1edb20..018ea08 100755 --- a/proxy/server.py +++ b/proxy/server.py @@ -58,13 +58,6 @@ import pypowerwall from pypowerwall import parse_version - -def normalize_caseless(text: str) -> str: - return unicodedata.normalize("NFKD", text.casefold()) - -def caseless_equal(left: str, right: str) -> bool: - return normalize_caseless(left) == normalize_caseless(right) - BUILD: Final[str] = "t67" UTF_8: Final[str] = "utf-8" @@ -904,12 +897,11 @@ def check_for_environmental_pw_configs() -> List[str]: """ suffixes_to_check = {"", "1"} actual_configs = [] - - environment = [normalize_caseless(key) for key in os.environ] + + environment = [key.lower() for key in os.environ] while suffixes_to_check: current_suffix = suffixes_to_check.pop() test_suffix = f"_{current_suffix}" if current_suffix.isnumeric() else current_suffix - #if any( in (normalize_caseless(key) ) ): if any(f"{config.value}{test_suffix}" in environment for config in CONFIG_TYPE): actual_configs.append(test_suffix) elif current_suffix.isnumeric() and int(current_suffix) > 1: