CVS: Products/ParsedXML/DOM - Core.py:1.136
Martijn Faassen <[email protected]> Sat, 1 Jun 2002 11:45:27 -0400
| Newsgroups | gmane.comp.web.zope.parsed-xml |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs-repository/Products/ParsedXML/DOM
In directory cvs.zope.org:/tmp/cvs-serv16308
Modified Files:
Core.py
Log Message:
Fixed a bug in previousSibling/nextSibling; as Node can be false you
cannot rely on a 'if node:' test to check for non-None-ness.
=== Products/ParsedXML/DOM/Core.py 1.135 => 1.136 ===
def _get_nextSibling(self):
node = self._getSiblingInfo()[1]
- if node:
+ if node is not None:
return node.__of__(self.parentNode)
nextSibling = ComputedAttribute(_get_nextSibling, 1)
def _get_previousSibling(self):
node = self._getSiblingInfo()[0]
- if node:
+ if node is not None:
return node.__of__(self.parentNode)
previousSibling = ComputedAttribute(_get_previousSibling, 1)