From: Stefan Huber Date: Mon, 2 Sep 2024 06:51:38 +0000 (+0200) Subject: Improve compatibility with Debian X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;ds=inline;p=oauth2_token_manager.git Improve compatibility with Debian --- diff --git a/README.md b/README.md index 2e89f52..5d18910 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,12 @@ These can be installed using pip: pip install -r requirements.txt ``` +Or in Debian-based Linux systems: + +```sh +sudo apt install python3-platformdirs python3-requests +``` + ## Usage diff --git a/oauth2_token_manager b/oauth2_token_manager index aeb9810..f03aa99 100755 --- a/oauth2_token_manager +++ b/oauth2_token_manager @@ -402,7 +402,10 @@ Example usage: if args.debug: args.verbose = True - cachedir = user_cache_dir("oauth2_token_manager", ensure_exists=True) + # Debian Bookworm's version does not know ensure_exists + # cachedir = user_cache_dir("oauth2_token_manager", ensure_exists=True) + cachedir = user_cache_dir("oauth2_token_manager") + os.makedirs(cachedir, mode=0o700, exist_ok=True) args.tokenfile = os.path.join(cachedir, args.tokenfile) debug_log("Token file: ", args.tokenfile)