Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Commit

Permalink
Fail with NoSuchRecordError if create=False and non-existing records …
Browse files Browse the repository at this point in the history
…are updated.

git-svn-id: https://svn.calendarserver.org/repository/calendarserver/CalendarServer/trunk@10678 e27351fd-9f3e-4f54-a53b-843176b1656c
  • Loading branch information
Wilfredo Sanchez committed Feb 11, 2013
1 parent 7f3ebaa commit 44ea8c8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions twext/who/xml.py
Expand Up @@ -33,9 +33,9 @@
from xml.etree.ElementTree import Element as XMLElement from xml.etree.ElementTree import Element as XMLElement


from twisted.python.constants import Names, NamedConstant, Values, ValueConstant from twisted.python.constants import Names, NamedConstant, Values, ValueConstant
from twisted.internet.defer import succeed, inlineCallbacks, returnValue from twisted.internet.defer import succeed, fail, inlineCallbacks, returnValue


from twext.who.idirectory import DirectoryServiceError from twext.who.idirectory import DirectoryServiceError, NoSuchRecordError
from twext.who.idirectory import RecordType, FieldName as BaseFieldName from twext.who.idirectory import RecordType, FieldName as BaseFieldName
from twext.who.idirectory import MatchType from twext.who.idirectory import MatchType
from twext.who.idirectory import DirectoryQueryMatchExpression from twext.who.idirectory import DirectoryQueryMatchExpression
Expand Down Expand Up @@ -443,7 +443,7 @@ def updateRecords(self, records, create=False):


if recordsByUID: if recordsByUID:
if not create: if not create:
raise NotImplementedError("Raise something.") return fail(NoSuchRecordError(recordsByUID.keys()))


raise NotImplementedError("Add new records.") raise NotImplementedError("Add new records.")


Expand Down

0 comments on commit 44ea8c8

Please sign in to comment.