[CalendarServer-changes] [566] CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/ directory/apache.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Nov 22 14:55:05 PST 2006


Revision: 566
          http://trac.macosforge.org/projects/calendarserver/changeset/566
Author:   wsanchez at apple.com
Date:     2006-11-22 14:55:04 -0800 (Wed, 22 Nov 2006)

Log Message:
-----------
Fix if/else logic bug

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/directory/apache.py

Modified: CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/directory/apache.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/directory/apache.py	2006-11-22 22:22:28 UTC (rev 565)
+++ CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/directory/apache.py	2006-11-22 22:55:04 UTC (rev 566)
@@ -67,7 +67,7 @@
                     cryptPassword = entryData,
                 )
 
-            if recordType == "group":
+            elif recordType == "group":
                 yield GroupRecord(
                     service    = self,
                     recordType = recordType,
@@ -75,9 +75,9 @@
                     members    = entryData,
                 )
 
-            # Subclass should cover the remaining record types
-            raise AssertionError("Subclass should have handled record type: %r"
-                                 % (recordType,))
+            else:
+                # Subclass should cover the remaining record types
+                raise AssertionError("Unknown record type: %r" % (recordType,))
 
     def recordWithShortName(self, recordType, shortName):
         for entryShortName, entryData in self.entriesForRecordType(recordType):
@@ -99,8 +99,7 @@
                     )
 
                 # Subclass should cover the remaining record types
-                raise AssertionError("Subclass should have handled record type: %r"
-                                     % (recordType,))
+                raise AssertionError("Unknown record type: %r" % (recordType,))
 
         return None
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061122/1aabd24a/attachment.html


More information about the calendarserver-changes mailing list