Bläddra i källkod

Account/Workspace creation: manage case where raidcale is down

Bastien Sevajol (Algoo) 8 år sedan
förälder
incheckning
75962afb93
1 ändrade filer med 6 tillägg och 2 borttagningar
  1. 6 2
      tracim/tracim/lib/calendar.py

+ 6 - 2
tracim/tracim/lib/calendar.py Visa fil

@@ -3,6 +3,7 @@ import os
3 3
 
4 4
 import re
5 5
 import transaction
6
+from caldav.lib.error import PutError
6 7
 
7 8
 from icalendar import Event as iCalendarEvent
8 9
 from sqlalchemy.orm.exc import NoResultFound
@@ -356,6 +357,9 @@ LOCATION:Here
356 357
 END:VEVENT
357 358
 END:VCALENDAR
358 359
 """.format(uid='{0}FAKEEVENT'.format(related_object_id))
359
-        event = user_calendar.add_event(event_ics)
360
-        event.delete()
360
+        try:
361
+            event = user_calendar.add_event(event_ics)
362
+            event.delete()
363
+        except PutError:
364
+            pass  # TODO BS 20161128: Radicale is down. Record this event ?
361 365