Dont fail to write the appdata file if there is an error rendering the changelog

This commit is contained in:
Kovid Goyal 2020-10-30 16:22:37 +05:30
parent 0dbebeb2aa
commit 42423d730b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1284,7 +1284,11 @@ def write_appdata(key, entry, base, translators):
root.append(E.summary(tp))
root[-1].set('{http://www.w3.org/XML/1998/namespace}lang', lang)
if entry.get('include-releases', False):
root.append(make_appdata_releases())
try:
root.append(make_appdata_releases())
except Exception:
import traceback
traceback.print_exc()
with open(fpath, 'wb') as f:
f.write(tostring(root, encoding='utf-8', xml_declaration=True, pretty_print=True))
return fpath