[CalendarServer-changes] [15039] CalendarServer/trunk/txdav/caldav/datastore/sql_attachment.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Aug 13 10:14:58 PDT 2015


Revision: 15039
          http://trac.calendarserver.org//changeset/15039
Author:   sagen at apple.com
Date:     2015-08-13 10:14:58 -0700 (Thu, 13 Aug 2015)
Log Message:
-----------
Don't let a missing attachment file trip us up when we're only trying to delete it anyway

Modified Paths:
--------------
    CalendarServer/trunk/txdav/caldav/datastore/sql_attachment.py

Modified: CalendarServer/trunk/txdav/caldav/datastore/sql_attachment.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql_attachment.py	2015-08-12 18:11:58 UTC (rev 15038)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql_attachment.py	2015-08-13 17:14:58 UTC (rev 15039)
@@ -544,7 +544,8 @@
         """
         Remove the actual file and up to attachment parent directory if empty.
         """
-        self._path.remove()
+        if self._path.exists():
+            self._path.remove()
         self.removeParentPaths()
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150813/3a84db5b/attachment.html>


More information about the calendarserver-changes mailing list