[Lxml-checkins] r47639 - lxml/branch/lxml-1.3/src/lxml

scoder at codespeak.net scoder at codespeak.net
Sat Oct 20 14:52:33 CEST 2007


Author: scoder
Date: Sat Oct 20 14:52:33 2007
New Revision: 47639

Modified:
   lxml/branch/lxml-1.3/src/lxml/etree.pyx
Log:
fix error handling on PyList_Append()

Modified: lxml/branch/lxml-1.3/src/lxml/etree.pyx
==============================================================================
--- lxml/branch/lxml-1.3/src/lxml/etree.pyx	(original)
+++ lxml/branch/lxml-1.3/src/lxml/etree.pyx	Sat Oct 20 14:52:33 2007
@@ -829,10 +829,8 @@
         result = []
         while c_node is not NULL and c < stop:
             if _isElement(c_node):
-                ret = python.PyList_Append(
+                python.PyList_Append(
                     result, _elementFactory(self._doc, c_node))
-                if ret:
-                    raise
                 c = c + 1
             c_node = c_node.next
         return result
@@ -967,15 +965,12 @@
         """Returns all subelements. The elements are returned in document order.
         """
         cdef xmlNode* c_node
-        cdef int ret
         result = []
         c_node = self._c_node.children
         while c_node is not NULL:
             if _isElement(c_node):
-                ret = python.PyList_Append(
+                python.PyList_Append(
                     result, _elementFactory(self._doc, c_node))
-                if ret:
-                    raise
             c_node = c_node.next
         return result
 


More information about the lxml-checkins mailing list