Skip to content
This repository has been archived by the owner. It is now read-only.
Browse files

Fail with NoSuchRecordError if create=False and non-existing records …

…are updated.

git-svn-id: e27351fd-9f3e-4f54-a53b-843176b1656c
  • Loading branch information
wsanchez committed Feb 11, 2013
1 parent 7f3ebaa commit 44ea8c82cdec2ea07bb9fed053f26ba0ab529a02
Showing with 3 additions and 3 deletions.
  1. +3 −3 twext/who/
@@ -33,9 +33,9 @@
from xml.etree.ElementTree import Element as XMLElement

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 MatchType
from twext.who.idirectory import DirectoryQueryMatchExpression
@@ -443,7 +443,7 @@ def updateRecords(self, records, create=False):

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

raise NotImplementedError("Add new records.")

0 comments on commit 44ea8c8

Please sign in to comment.
You can’t perform that action at this time.