[CalendarServer-changes] [14536] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 9 14:24:54 PDT 2015
Revision: 14536
http://trac.calendarserver.org//changeset/14536
Author: cdaboo at apple.com
Date: 2015-03-09 14:24:54 -0700 (Mon, 09 Mar 2015)
Log Message:
-----------
Make sure that MKCALENDAR after delete of shared calendar fails properly.
Modified Paths:
--------------
CalendarServer/trunk/requirements-dev.txt
CalendarServer/trunk/twistedcaldav/storebridge.py
Modified: CalendarServer/trunk/requirements-dev.txt
===================================================================
--- CalendarServer/trunk/requirements-dev.txt 2015-03-09 21:22:31 UTC (rev 14535)
+++ CalendarServer/trunk/requirements-dev.txt 2015-03-09 21:24:54 UTC (rev 14536)
@@ -8,4 +8,4 @@
q
tl.eggdeps
--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVClientLibrary/trunk@13420#egg=CalDAVClientLibrary
---editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14461#egg=CalDAVTester
+--editable svn+http://svn.calendarserver.org/repository/calendarserver/CalDAVTester/trunk@14535#egg=CalDAVTester
Modified: CalendarServer/trunk/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/storebridge.py 2015-03-09 21:22:31 UTC (rev 14535)
+++ CalendarServer/trunk/twistedcaldav/storebridge.py 2015-03-09 21:24:54 UTC (rev 14536)
@@ -73,7 +73,7 @@
InvalidObjectResourceError, ObjectResourceNameNotAllowedError,
ObjectResourceNameAlreadyExistsError, UIDExistsError,
UIDExistsElsewhereError, InvalidUIDError, InvalidResourceMove,
- InvalidComponentForStoreError
+ InvalidComponentForStoreError, HomeChildNameAlreadyExistsError
)
from txdav.idav import PropertyChangeNotAllowedError
from txdav.who.wiki import RecordType as WikiRecordType
@@ -435,7 +435,12 @@
"""
Override C{createCollection} to actually do the work.
"""
- self._newStoreObject = (yield self._newStoreParentHome.createChildWithName(self._name))
+ try:
+ self._newStoreObject = (yield self._newStoreParentHome.createChildWithName(self._name))
+ except HomeChildNameAlreadyExistsError:
+ # We already check for an existing child prior to this call so the only time this fails is if
+ # there is an unaccepted share with the same name
+ raise HTTPError(StatusResponse(responsecode.FORBIDDEN, "Unaccepted share exists"))
# Re-initialize to get stuff setup again now we have a "real" object
self._initializeWithHomeChild(self._newStoreObject, self._parentResource)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150309/08daac6d/attachment-0001.html>
More information about the calendarserver-changes
mailing list