Unittestler birkaç hata daha yakaladı.

her spec dosyası içerisinde dependency tanımları ve patch olmak
zorunda değil. specfile içerisinde bunun için gerekli düzenleme
yapıldı.

xmlfile içerisine xml hata-yakalama eklendi.
This commit is contained in:
Barış Metin
2005-06-16 10:32:10 +00:00
parent ec88a6f821
commit 0b21799a72
+6 -1
View File
@@ -20,6 +20,8 @@ def getNodeText(node):
child = node.childNodes[0]
except IndexError:
return None
except AttributeError: # no node by that name
return None
if child.nodeType == child.TEXT_NODE:
return child.data
else:
@@ -126,7 +128,10 @@ class XmlFile(object):
def getChildElts(self, tagpath):
""" returns the children of the given path, only with given type """
node = self.getNode(tagpath)
return filter(lambda x:x.nodeType==x.ELEMENT_NODE, node.childNodes)
try:
return filter(lambda x:x.nodeType==x.ELEMENT_NODE, node.childNodes)
except AttributeError:
return None
def getChildText(self, tagpath):
node = self.getNode(tagpath)