Fix Google Calendar/Gmail disabled by read-only token mount #72

Merged
ryan merged 1 commits from fix/google-token-readonly into main 2026-10-12 22:46:03 -04:00
+5 -2
View File
@@ -25,8 +25,11 @@ class GoogleService:
creds = Credentials.from_authorized_user_file(token_path, SCOPES)
if creds.expired and creds.refresh_token:
creds.refresh(Request())
with open(token_path, "w") as f:
f.write(creds.to_json())
try:
with open(token_path, "w") as f:
f.write(creds.to_json())
except OSError:
pass # read-only mount; refreshed creds live in memory
self._creds = creds
self._calendar = build("calendar", "v3", credentials=creds)