Update tostring while writing xml
lxml library tostring() accepts only one argument instead of 2 like it was before. This commit removes the second argument. Closes-Bug: 1977869 Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com> Change-Id: I9bb43a758bb660c8ab6edbf54984ff993b7f8598
This commit is contained in:
parent
9342be978b
commit
b94c464a74
@ -141,7 +141,7 @@ def handle_exception(exc_type, exc_value, exc_traceback):
|
||||
def write_xml_file(top, fname):
|
||||
# Generate the file, in a readable format if possible
|
||||
outfile = open(fname, 'w')
|
||||
rough_xml = ElementTree.tostring(top, 'utf-8')
|
||||
rough_xml = ElementTree.tostring(top)
|
||||
if platform.python_version() == "2.7.2":
|
||||
# The 2.7.2 toprettyxml() function unnecessarily indents
|
||||
# childless tags, adding whitespace. In the case of the
|
||||
@ -1134,7 +1134,7 @@ class PatchRecipeData(object):
|
||||
def write_xml_file(self, top, fname):
|
||||
# Generate the file, in a readable format if possible
|
||||
outfile = open(fname, 'w')
|
||||
rough_xml = ElementTree.tostring(top, 'utf-8')
|
||||
rough_xml = ElementTree.tostring(top)
|
||||
if platform.python_version() == "2.7.2":
|
||||
# The 2.7.2 toprettyxml() function unnecessarily indents
|
||||
# childless tags, adding whitespace. In the case of the
|
||||
|
@ -500,7 +500,7 @@ class PatchData(object):
|
||||
|
||||
# write the modified file
|
||||
outfile = open(new_filename, 'w')
|
||||
rough_xml = ElementTree.tostring(root, 'utf-8')
|
||||
rough_xml = ElementTree.tostring(root)
|
||||
if platform.python_version() == "2.7.2":
|
||||
# The 2.7.2 toprettyxml() function unnecessarily indents
|
||||
# childless tags, adding whitespace. In the case of the
|
||||
|
@ -278,7 +278,7 @@ class PatchData(object):
|
||||
|
||||
# write the modified file
|
||||
outfile = open(new_filename, 'w')
|
||||
rough_xml = ElementTree.tostring(root, 'utf-8')
|
||||
rough_xml = ElementTree.tostring(root)
|
||||
if platform.python_version() == "2.7.2":
|
||||
# The 2.7.2 toprettyxml() function unnecessarily indents
|
||||
# childless tags, adding whitespace. In the case of the
|
||||
|
Loading…
Reference in New Issue
Block a user