From 2fb7a8d99f8c0240cfb9b3683487da3f1ebcfb5f Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Wed, 6 Apr 2016 15:14:55 +0200 Subject: [PATCH] More bugfixes for Google --- vdirsyncer/storage/google.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/storage/google.py b/vdirsyncer/storage/google.py index e57ad15..263e100 100644 --- a/vdirsyncer/storage/google.py +++ b/vdirsyncer/storage/google.py @@ -26,12 +26,17 @@ except ImportError: class GoogleSession(dav.DavSession): - def __init__(self, token_file, client_id=None, client_secret=None): + def __init__(self, token_file, url=None, client_id=None, + client_secret=None): # Not a default in function signature, otherwise these show up in user # documentation client_id = client_id or CLIENT_ID client_secret = client_secret or CLIENT_SECRET + # Required for discovering collections + if url is not None: + self.url = url + self.useragent = client_id self._settings = {} @@ -157,4 +162,4 @@ class GoogleContactsStorage(dav.CarddavStorage): # This is ugly: We define/override the entire signature computed for the # docs here because the current way we autogenerate those docs are too # simple for our advanced argspec juggling in `vdirsyncer.storage.dav`. - __init__._traverse_superclass = False + __init__._traverse_superclass = base.Storage