[CalendarServer-changes] [15320] CalDAVClientLibrary/trunk/caldavclientlibrary/protocol/webdav/ace. py

source_changes at macosforge.org source_changes at macosforge.org
Mon Nov 16 10:24:43 PST 2015


Revision: 15320
          http://trac.calendarserver.org//changeset/15320
Author:   cdaboo at apple.com
Date:     2015-11-16 10:24:42 -0800 (Mon, 16 Nov 2015)
Log Message:
-----------
API clean-up.

Modified Paths:
--------------
    CalDAVClientLibrary/trunk/caldavclientlibrary/protocol/webdav/ace.py

Modified: CalDAVClientLibrary/trunk/caldavclientlibrary/protocol/webdav/ace.py
===================================================================
--- CalDAVClientLibrary/trunk/caldavclientlibrary/protocol/webdav/ace.py	2015-11-16 18:20:33 UTC (rev 15319)
+++ CalDAVClientLibrary/trunk/caldavclientlibrary/protocol/webdav/ace.py	2015-11-16 18:24:42 UTC (rev 15320)
@@ -58,19 +58,19 @@
 
     def parseACE(self, acenode):
 
-        assert(acenode and acenode.tag == davxml.ace)
+        assert(len(acenode) and acenode.tag == davxml.ace)
 
         # Get invert
         self.invert = False
         principal_parent = acenode
         invert = acenode.find(str(davxml.invert))
-        if invert:
+        if invert is not None:
             self.invert = True
             principal_parent = invert
 
         # Get the principal
         principal = principal_parent.find(str(davxml.principal))
-        if not principal or len(principal.getchildren()) != 1:
+        if principal is None or len(principal.getchildren()) != 1:
             return False
 
         # Determine principal info
@@ -90,11 +90,11 @@
         # Determine rights
         self.grant = True
         child = acenode.find(str(davxml.grant))
-        if not child:
+        if child is None:
             child = acenode.find(str(davxml.deny))
-            if child:
+            if child is not None:
                 self.grant = False
-        if child:
+        if child is not None:
             self.parsePrivileges(child)
 
         # Determine protected/inherited state
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20151116/f9d69961/attachment-0001.html>


More information about the calendarserver-changes mailing list