[CalendarServer-changes] [8222] CalDAVTester/branches/users/cdaboo/component-set-fixes/verifiers/ xmlElementMatch.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Oct 25 12:41:54 PDT 2011


Revision: 8222
          http://trac.macosforge.org/projects/calendarserver/changeset/8222
Author:   cdaboo at apple.com
Date:     2011-10-25 12:41:53 -0700 (Tue, 25 Oct 2011)
Log Message:
-----------
Fix bug with empty nodes being tested for string content.

Modified Paths:
--------------
    CalDAVTester/branches/users/cdaboo/component-set-fixes/verifiers/xmlElementMatch.py

Modified: CalDAVTester/branches/users/cdaboo/component-set-fixes/verifiers/xmlElementMatch.py
===================================================================
--- CalDAVTester/branches/users/cdaboo/component-set-fixes/verifiers/xmlElementMatch.py	2011-10-25 19:22:52 UTC (rev 8221)
+++ CalDAVTester/branches/users/cdaboo/component-set-fixes/verifiers/xmlElementMatch.py	2011-10-25 19:41:53 UTC (rev 8222)
@@ -101,10 +101,10 @@
                                 if node.text == test[1:]:
                                     result = "        Incorrect value returned in XML for %s\n" % (path,)
                             elif test[0] == '*':
-                                if node.text.find(test[1:]) == -1:
+                                if node.text is None or node.text.find(test[1:]) == -1:
                                     result = "        Incorrect value returned in XML for %s\n" % (path,)
                             elif test[0] == '+':
-                                if not node.text.startswith(test[1:]):
+                                if node.text is None or not node.text.startswith(test[1:]):
                                     result = "        Incorrect value returned in XML for %s\n" % (path,)
                             return result
                         
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20111025/7824fa64/attachment.html>


More information about the calendarserver-changes mailing list