From 348936752a3787ab0a89a721ffea4b8ba63168d6 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Sat, 7 Mar 2026 00:05:05 -0800 Subject: [PATCH] fix: simplify timezone migration to use os.getenv directly The previous 'get_env_value' in dir() check always evaluated to False (dir() returns local scope, not module scope), making the left branch dead code. Simplified to just os.getenv() which was the fallback anyway. --- hermes_cli/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 901d60d7..671398e6 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -573,7 +573,7 @@ def migrate_config(interactive: bool = True, quiet: bool = False) -> Dict[str, A if current_ver < 5: config = load_config() if "timezone" not in config: - old_tz = get_env_value("HERMES_TIMEZONE") if "get_env_value" in dir() else os.getenv("HERMES_TIMEZONE", "") + old_tz = os.getenv("HERMES_TIMEZONE", "") if old_tz and old_tz.strip(): config["timezone"] = old_tz.strip() results["config_added"].append(f"timezone={old_tz.strip()} (from HERMES_TIMEZONE)")