Skip to content
Snippets Groups Projects
Commit 2cba9975 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

"render_template" inside "try ..."

parent 4ad23fad
No related branches found
No related tags found
No related merge requests found
...@@ -20,10 +20,10 @@ def cert_to_xml(cert_doc): ...@@ -20,10 +20,10 @@ def cert_to_xml(cert_doc):
'release':version \ 'release':version \
} }
cert_doc['DCC']['administrativeData']['dccSoftware'].append(s) cert_doc['DCC']['administrativeData']['dccSoftware'].append(s)
try:
xml = render_template(dcc_template, doc=cert_doc['DCC'], utils=utils) xml = render_template(dcc_template, doc=cert_doc['DCC'], utils=utils)
try:
xml = etree.canonicalize(prettify_xml(xml, indent=2, debug=False)) xml = etree.canonicalize(prettify_xml(xml, indent=2, debug=False))
except Exception as error: except Exception as error:
xml = '<error>' + str(error) + '</error>\n' xml = '<error>' + str(error) + '</error>\n'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment