summaryrefslogtreecommitdiffstats
path: root/Tools/Python
diff options
context:
space:
mode:
authorbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-23 21:36:21 +0000
committerbbahnsen <bbahnsen@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-23 21:36:21 +0000
commitf0a3fde1603e1b28350240ae796a708e5351a9f1 (patch)
tree38cf2c18ecf880fc59c777b919bd265b0ef81063 /Tools/Python
parentc7c02fabf120cc1aeccd0cb0fc7f8671fa1cb25e (diff)
downloadedk2-f0a3fde1603e1b28350240ae796a708e5351a9f1.tar.gz
edk2-f0a3fde1603e1b28350240ae796a708e5351a9f1.tar.bz2
edk2-f0a3fde1603e1b28350240ae796a708e5351a9f1.zip
Changing XmlAppendChildElement to return the new XML node on success.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2289 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Python')
-rwxr-xr-xTools/Python/XmlRoutines.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/Python/XmlRoutines.py b/Tools/Python/XmlRoutines.py
index 1757ea019c..3ffb847009 100755
--- a/Tools/Python/XmlRoutines.py
+++ b/Tools/Python/XmlRoutines.py
@@ -143,14 +143,14 @@ def XmlAppendChildElement(ParentNode, TagName, ElementText='', AttributeDictiona
"""Add a child element to a DOM(Document Object Model) tree with optional Attributes."""
TagName = TagName.strip()
if TagName == '':
- return False
+ return None
Depth = 0
Dom = ParentNode
while Dom != None and Dom.nodeType != Dom.DOCUMENT_NODE:
Dom = Dom.parentNode
Depth += 1
if Dom == None:
- return False
+ return None
ParentNode.appendChild(Dom.createTextNode('\n%*s' % (Depth * 2, '')))
ElementNode = Dom.createElement(TagName)
if ElementText != '':
@@ -158,7 +158,7 @@ def XmlAppendChildElement(ParentNode, TagName, ElementText='', AttributeDictiona
for Item in AttributeDictionary:
ElementNode.setAttribute(Item, AttributeDictionary[Item])
ParentNode.appendChild(ElementNode)
- return True
+ return ElementNode
# This acts like the main() function for the script, unless it is 'import'ed into another