]> git.sthu.org Git - oauth2_token_manager.git/commitdiff
Improve compatibility with Debian main
authorStefan Huber <shuber@sthu.org>
Mon, 2 Sep 2024 06:51:38 +0000 (08:51 +0200)
committerStefan Huber <shuber@sthu.org>
Mon, 2 Sep 2024 06:51:38 +0000 (08:51 +0200)
README.md
oauth2_token_manager

index 2e89f52f1dc5f379cd8a0965c106d8500978c148..5d189105451c9cad2a4ea978468d406144acd417 100644 (file)
--- 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
 
index aeb981097db084ae56e1a6d5da6db3320ec161e0..f03aa99faf8d9bb84f442709e227808c76316d01 100755 (executable)
@@ -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)