Commit fb66f104 authored by Tijmen de Mes's avatar Tijmen de Mes

Fixed google contacts

parent 145e75b0
...@@ -954,7 +954,10 @@ class GoogleContactsManager(object, metaclass=Singleton): ...@@ -954,7 +954,10 @@ class GoogleContactsManager(object, metaclass=Singleton):
settings.google_contacts.username = notification.data.email settings.google_contacts.username = notification.data.email
settings.save() settings.save()
try: try:
self._service = build('people', 'v1', credentials=notification.data.credentials, http=Http(timeout=10), cache_discovery=False) # todo: what's the best fix for cache? # self._service = build('people', 'v1', credentials=notification.data.credentials, http=Http(timeout=10), cache_discovery=False) # todo: what's the best fix for cache?
# Http can't be used like this in this version, see https://github.com/googleapis/google-api-python-client/issues/851
self._service = build('people', 'v1', credentials=notification.data.credentials, cache_discovery=False) # todo: what's the best fix for cache?
except Exception as e: except Exception as e:
log.error('Error fetching Google contacts: %s' % str(e)) log.error('Error fetching Google contacts: %s' % str(e))
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment