mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
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.
This commit is contained in:
parent
69a36a3361
commit
348936752a
1 changed files with 1 additions and 1 deletions
|
|
@ -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)")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue