mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
parent
10490a12f1
commit
7f38102936
2 changed files with 9 additions and 0 deletions
|
|
@ -185,6 +185,10 @@ Service to hardcode those into opensource software
|
|||
4. Finally you should have a Client ID and a Client secret. Provide these in
|
||||
your storage config.
|
||||
|
||||
The ``token_file`` parameter should be a filepath where vdirsyncer can later
|
||||
store authentication-related data. You do not need to create the file itself
|
||||
(or write anything to it), only the folder around it.
|
||||
|
||||
You can select which calendars to sync on `CalDav settings page
|
||||
<https://calendar.google.com/calendar/syncselect>`_.
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ class GoogleSession(dav.DAVSession):
|
|||
token = json.load(f)
|
||||
except (OSError, IOError):
|
||||
pass
|
||||
except ValueError as e:
|
||||
raise exceptions.UserError(
|
||||
'Failed to load token file {}, try deleting it. '
|
||||
'Original error: {}'.format(token_file, e)
|
||||
)
|
||||
|
||||
def _save_token(token):
|
||||
with atomic_write(token_file, mode='w', overwrite=True) as f:
|
||||
|
|
|
|||
Loading…
Reference in a new issue