[CalendarServer-changes] [1223] CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Feb 20 18:54:42 PST 2007


Revision: 1223
          http://trac.macosforge.org/projects/calendarserver/changeset/1223
Author:   wsanchez at apple.com
Date:     2007-02-20 18:54:41 -0800 (Tue, 20 Feb 2007)

Log Message:
-----------
cosmetic

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py

Modified: CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py	2007-02-21 02:53:00 UTC (rev 1222)
+++ CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py	2007-02-21 02:54:41 UTC (rev 1223)
@@ -331,29 +331,35 @@
                         False,
                         False,
                         listRecordType,
-                        attrs)
+                        attrs,
+                    )
                 else:
                     results = opendirectory.listAllRecordsWithAttributes(
                         self.directory,
                         listRecordType,
-                        attrs)
+                        attrs,
+                    )
             except opendirectory.ODError, ex:
                 log.msg("Open Directory (node=%s) error: %s" % (self.realmName, str(ex)))
                 raise
 
             for (key, value) in results.iteritems():
                 if self.useFullSchema:
-	                # Make sure this user has service enabled.
+                    # Make sure this record has service enabled.
                     enabled = True
-                    service = value.get(dsattributes.kDSNAttrServicesLocator)
-                    if isinstance(service, str):
-                        service = [service]
-                    for item in service:
-                        if item.startswith(self.servicetag):
-                            if item.endswith(":disabled"):
+
+                    services = value.get(dsattributes.kDSNAttrServicesLocator)
+                    if isinstance(services, str):
+                        services = [services]
+
+                    for service in services:
+                        if service.startswith(self.servicetag):
+                            if service.endswith(":disabled"):
                                 enabled = False
                             break
+
                     if not enabled:
+                        log.err("Record %s is not enabled" % ())
                         continue
 
                 # Now get useful record info.
@@ -386,6 +392,8 @@
                     memberGUIDs           = memberGUIDs,
                 )
 
+                #log.debug("Populated record: %s" % (records[shortName],))
+
             storage = {
                 "status": "new",
                 "records": records,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070220/532ffa3d/attachment.html


More information about the calendarserver-changes mailing list