mirror of
https://github.com/b4tman/sync_ics2gcal
synced 2025-01-21 07:28:24 +00:00
disable cache_discovery
to suppress errors in logs: file_cache is unavailable when using oauth2client >= 4.0.0 https://github.com/googleapis/google-api-python-client/issues/299 https://github.com/googleapis/google-api-python-client/issues/325
This commit is contained in:
parent
d146eec7ae
commit
5d37aa2a33
@ -26,7 +26,7 @@ class GoogleCalendarService():
|
||||
|
||||
scopes = ['https://www.googleapis.com/auth/calendar']
|
||||
credentials, _ = google.auth.default(scopes=scopes)
|
||||
service = discovery.build('calendar', 'v3', credentials=credentials)
|
||||
service = discovery.build('calendar', 'v3', credentials=credentials, cache_discovery=False)
|
||||
return service
|
||||
|
||||
@staticmethod
|
||||
@ -40,7 +40,7 @@ class GoogleCalendarService():
|
||||
scopes = ['https://www.googleapis.com/auth/calendar']
|
||||
credentials = service_account.Credentials.from_service_account_file(service_account_file)
|
||||
scoped_credentials = credentials.with_scopes(scopes)
|
||||
service = discovery.build('calendar', 'v3', credentials=scoped_credentials)
|
||||
service = discovery.build('calendar', 'v3', credentials=scoped_credentials, cache_discovery=False)
|
||||
return service
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user