mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 10:10:46 +00:00
target: Make sure xml is encoded properly before writing to file
Some UI elements can contain non ASCII characters so ensure we encode the output to utf-8 before writing to file.
This commit is contained in:
parent
87b235638a
commit
58c0d30b26
@ -1188,7 +1188,7 @@ class AndroidTarget(Target):
|
||||
|
||||
parsed_xml = xml.dom.minidom.parse(filepath)
|
||||
with open(filepath, 'w') as f:
|
||||
f.write(parsed_xml.toprettyxml())
|
||||
f.write(parsed_xml.toprettyxml().encode('utf-8'))
|
||||
|
||||
def is_installed(self, name):
|
||||
return super(AndroidTarget, self).is_installed(name) or self.package_is_installed(name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user