diff --git a/xepinfo.py b/xepinfo.py index 54a726559..561711969 100644 --- a/xepinfo.py +++ b/xepinfo.py @@ -57,7 +57,15 @@ def __init__(self, filename, parseStr): revNode = (headerNode.getElementsByTagName("revision")[0]) self.version = getText((revNode.getElementsByTagName("version")[0]).childNodes) self.date = getText((revNode.getElementsByTagName("date")[0]).childNodes) - + + depNode = headerNode.getElementsByTagName("dependencies") + self.depends = [] + if depNode: + depNode = depNode[0] + for dep in depNode.getElementsByTagName("spec"): + self.depends.append(getText(dep.childNodes)) + + def getNr(self): return self.nr @@ -75,4 +83,8 @@ def getType(self): def getDate(self): return self.date + + def getDepends(self): + return self.depends + \ No newline at end of file