Skip to content

Commit f19b22d

Browse files
committed
temp error handling
1 parent 07bc75b commit f19b22d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/blueapi/service/authentication.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@ def can_access_cache(self) -> bool:
7272
assert self._token_path
7373
try:
7474
Path(self._token_path.parent).mkdir(parents=True, exist_ok=True)
75-
os.chmod(self._token_path.parent, 0o777)
75+
os.chmod(self._token_path.parent, 0o666)
7676
self._token_path.write_text("")
7777
except IsADirectoryError:
7878
print("Invalid path: a directory path was provided instead of a file path")
7979
return False
8080
except PermissionError:
8181
print(f"Permission denied: Cannot write to {self._token_path.absolute()}")
8282
return False
83+
except Exception as e:
84+
print(f"It's gone wrong: {e}")
8385
return True
8486

8587

0 commit comments

Comments
 (0)