From 7577e4385c81bca0d0b828c122f35a064062741a Mon Sep 17 00:00:00 2001 From: Ross Scroggs Date: Sat, 21 Mar 2020 13:33:46 -0700 Subject: [PATCH] Another non-user calendar (#1123) * Another non-user calendar * Simplify identifying non-user calendars --- src/gapi/calendar.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gapi/calendar.py b/src/gapi/calendar.py index b8ae1a4e..df1c1827 100644 --- a/src/gapi/calendar.py +++ b/src/gapi/calendar.py @@ -35,8 +35,7 @@ def buildCalendarDataGAPIObject(calname): # admin for authentication. Resource calendars cannot be impersonated, # so we need to access them as the admin. cal = None - if (not calname.endswith('@resource.calendar.google.com') and - not calname.endswith('@group.calendar.google.com')): + if not calname.endswith('.calendar.google.com'): cal = __main__.buildGAPIServiceObject('calendar', calendarId, False) if cal is None: _, cal = buildCalendarGAPIObject(__main__._getValueFromOAuth('email'))