Skip to content

Commit 5d54c1c

Browse files
committed
fix: simplify setting the fallback value for cache_dir
1 parent 008720f commit 5d54c1c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ou_dedetai/constants.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ def get_runmode() -> str:
4444
if RUNMODE == 'snap':
4545
cache_dir = Path(os.getenv('SNAP_USER_COMMON')) / '.cache'
4646
else:
47-
try:
48-
cache_dir = Path(os.getenv('XDG_CACHE_HOME'))
49-
except TypeError:
50-
cache_dir = Path(os.getenv('HOME')) / '.cache'
51-
47+
cache_dir = Path(os.getenv('XDG_CACHE_HOME'), Path.home() / '.cache')
5248

5349
# Set other run-time variables not set in the env.
5450
DEFAULT_CONFIG_PATH = os.path.expanduser(f"~/.config/FaithLife-Community/{BINARY_NAME}.json") # noqa: E501

0 commit comments

Comments
 (0)