[FIX] google_calendar: error type
Test `e.code` only in case of `HTTPError`. In case of a `UserError`, `e.code` crashes. opw-1851319
This commit is contained in:
committed by
Nicolas Martinelli
parent
6be9593a0c
commit
6bbf38e171
@@ -844,7 +844,7 @@ class GoogleCalendar(models.AbstractModel):
|
||||
try:
|
||||
# if already deleted from gmail or never created
|
||||
recs.delete_an_event(current_event[0])
|
||||
except Exception, e:
|
||||
except urllib2.HTTPError, e:
|
||||
if e.code in (401, 410,):
|
||||
pass
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user