Skip to content

Commit bce322b

Browse files
committed
creating cache folder when checking access
1 parent 74bbcf0 commit bce322b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/blueapi/service/authentication.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ def _default_token_cache_path() -> Path:
7171
def can_access_cache(self) -> bool:
7272
assert self._token_path
7373
try:
74+
Path(self._token_path.parent).mkdir(parents=True, exist_ok=True)
75+
os.chmod(self._token_path.parent, 0o600)
7476
self._token_path.write_text("")
7577
except IsADirectoryError:
7678
print("Invalid path: a directory path was provided instead of a file path")

0 commit comments

Comments
 (0)