Skip to content

Commit

Permalink
Adding dependency attribute to XEPInfo class.
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/ksmith/gitmigration/svn/xmpp/trunk@3947 4b5297f7-1745-476d-ba37-a9c6900126ab
  • Loading branch information
tfar committed Feb 19, 2010
1 parent 6e6134e commit 8268ba6
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion xepinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -75,4 +83,8 @@ def getType(self):

def getDate(self):
return self.date

def getDepends(self):
return self.depends


0 comments on commit 8268ba6

Please sign in to comment.