Mercurial > codeOptimizer
diff Config.py @ 10:09b39021c4af
Make filename an attribute of file.
| author | Tom Fredrik Blenning Klaussen <bfg@blenning.no> |
|---|---|
| date | Wed, 14 Nov 2012 21:44:53 +0100 |
| parents | 3a56cd936c59 |
| children |
line wrap: on
line diff
--- a/Config.py Mon Sep 24 10:48:28 2012 +0200 +++ b/Config.py Wed Nov 14 21:44:53 2012 +0100 @@ -22,7 +22,7 @@ res = Config.getOption(potentialMatch, option, match) if not res: res = potentialMatch.getAttribute('cxxflags') - return res + return res return None def getCxxflags(self, name): @@ -34,6 +34,9 @@ def getFiles(self): retVal = [] for elem in self.document.getElementsByTagName('file'): - for t in elem.childNodes: - retVal.append(t.wholeText) + if elem.hasAttribute('name'): + retVal.append(elem.getAttribute('name')) + else: + raise xml.dom.SyntaxErr("<file> must have a name attribute") + return retVal
