flame: fix utf8 error 'unicode' object has no attribute 'getiterator'

This commit is contained in:
Jakub Jezek 2022-03-29 08:43:38 +02:00
parent eda39b5de2
commit 44257be486
No known key found for this signature in database
GPG key ID: D8548FBF690B100A

View file

@ -783,7 +783,7 @@ class OpenClipSolver:
if xml_clip.find("name").text in self.feed_basename:
matching_clip = xml_clip
if not matching_clip:
if matching_clip is not None:
# return warning there is missing clip
raise ET.ParseError(
"Missing clip in `{}`. Available clips {}".format(
@ -937,7 +937,7 @@ class OpenClipSolver:
def _fix_xml_data(self, xml_data):
xml_root = xml_data.getroot()
self._clear_handler(xml_root)
return ET.tostring(xml_root).decode('utf-8')
return xml_root
def _write_result_xml_to_file(self, file, xml_data):
# save it as new file