From 66184738b96994a430d9c9dd33f9efbfe1bfbb73 Mon Sep 17 00:00:00 2001 From: Ben Faulkner Date: Mon, 2 Mar 2026 01:35:13 -0500 Subject: [PATCH] Fix TypeError when XDG_CONFIG_HOME is set in environment os.environ is a mapping object and must be accessed with square brackets, not called as a function. Using os.environ() raises a TypeError which is silently swallowed, leaving _theme_dir unset and causing an AttributeError on any subsequent theme operation. Fixes alienfx crashing for users who have XDG_CONFIG_HOME set. --- alienfx/core/themefile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alienfx/core/themefile.py b/alienfx/core/themefile.py index 8b8b940..f34b7e8 100644 --- a/alienfx/core/themefile.py +++ b/alienfx/core/themefile.py @@ -76,7 +76,7 @@ def __init__(self, controller): self._theme_dir = os.path.expanduser("~/.config/alienfx") else: self._theme_dir = os.path.join( - os.environ("XDG_CONFIG_HOME"), "alienfx") + os.environ["XDG_CONFIG_HOME"], "alienfx") if not os.path.exists(self._theme_dir): os.makedirs(self._theme_dir) except Exception as exc: