[CalendarServer-changes] [13022] twext/trunk/twext/who/aggregate.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 28 10:07:54 PDT 2014


Revision: 13022
          http://trac.calendarserver.org//changeset/13022
Author:   sagen at apple.com
Date:     2014-03-28 10:07:54 -0700 (Fri, 28 Mar 2014)
Log Message:
-----------
Adds recordWithUID to aggregate

Modified Paths:
--------------
    twext/trunk/twext/who/aggregate.py

Modified: twext/trunk/twext/who/aggregate.py
===================================================================
--- twext/trunk/twext/who/aggregate.py	2014-03-28 16:32:39 UTC (rev 13021)
+++ twext/trunk/twext/who/aggregate.py	2014-03-28 17:07:54 UTC (rev 13022)
@@ -26,7 +26,7 @@
 from itertools import chain
 
 from twisted.internet.defer import (
-    gatherResults, FirstError, succeed, inlineCallbacks
+    gatherResults, FirstError, succeed, inlineCallbacks, returnValue
 )
 
 from .idirectory import DirectoryConfigurationError, IDirectoryService
@@ -95,6 +95,15 @@
         return d
 
 
+    @inlineCallbacks
+    def recordWithUID(self, uid):
+        for service in self.services:
+            record = yield service.recordWithUID(uid)
+            if record is not None:
+                returnValue(record)
+        returnValue(None)
+
+
     def recordWithShortName(self, recordType, shortName):
         # Since we know the recordType, we can go directly to the appropriate
         # service.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140328/fe087f3c/attachment.html>


More information about the calendarserver-changes mailing list