mirror of
https://github.com/GAM-team/GAM.git
synced 2026-06-23 23:51:36 +00:00
Fix bug (#1196)
``` $ gam calendar testsimple@rdschool.org addevent start 2020-05-17T08:00:00-07:00 end 2020-05-17T09:00:00-07:00 recurrence "RRULE:FREQ=WEEKLY;WKST=SU;COUNT=13;BYDAY=MO" summary "Monday Morning Meeting" Traceback (most recent call last): File "/Users/Ross/Documents/GoogleApps/GAMO/gam.py", line 11, in <module> main(sys.argv) File "/Users/Ross/Documents/GoogleApps/GAMO/gam/__main__.py", line 45, in main sys.exit(gam.ProcessGAMCommand(sys.argv)) File "/Users/Ross/Documents/GoogleApps/GAMO/gam/__init__.py", line 14413, in ProcessGAMCommand gapi_calendar.addOrUpdateEvent('add') File "/Users/Ross/Documents/GoogleApps/GAMO/gam/gapi/calendar.py", line 350, in addOrUpdateEvent sendUpdates, body = getEventAttributes(i, calendarId, cal, body, action) File "/Users/Ross/Documents/GoogleApps/GAMO/gam/gapi/calendar.py", line 537, in getEventAttributes if not timeZone: UnboundLocalError: local variable 'timeZone' referenced before assignment ```
This commit is contained in:
@@ -372,6 +372,7 @@ def getEventAttributes(i, calendarId, cal, body, action):
|
||||
# calendars are notified of changes
|
||||
sendUpdates = 'externalOnly'
|
||||
action = 'update' if body else 'add'
|
||||
timeZone = None
|
||||
while i < len(sys.argv):
|
||||
myarg = sys.argv[i].lower().replace('_', '')
|
||||
if myarg in ['notifyattendees', 'sendnotifications', 'sendupdates']:
|
||||
|
||||
Reference in New Issue
Block a user