Skip to content

Commit

Permalink
prefer platformdirs if available
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Nov 1, 2021
1 parent 688d007 commit 3c4bf96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytools/persistent_dict.py
Expand Up @@ -464,7 +464,11 @@ def __init__(self, identifier, key_builder=None, container_dir=None):

from os.path import join
if container_dir is None:
import appdirs
try:
import platformdirs as appdirs
except ImportError:
import appdirs

container_dir = join(
appdirs.user_cache_dir("pytools", "pytools"),
"pdict-v4-{}-py{}".format(
Expand Down

0 comments on commit 3c4bf96

Please sign in to comment.