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

error handling

parent 6793abe4
No related branches found
No related tags found
No related merge requests found
...@@ -18,9 +18,13 @@ def cert_to_xml(cert_doc): ...@@ -18,9 +18,13 @@ def cert_to_xml(cert_doc):
'name':[{'content':[config['name']],'lang':'en'}], \ 'name':[{'content':[config['name']],'lang':'en'}], \
'release':version \ 'release':version \
} }
cert_doc['DCC']['administrativeData']['dccSoftware'].append(s) cert_doc['DCC']['administrativeData']['dccSoftware'].append(s)
xml = prettify_xml(render_template(dcc_template, doc=cert_doc['DCC']), \
indent=2, debug=False) xml = render_template(dcc_template, doc=cert_doc['DCC'])
try:
xml = prettify_xml(xml, indent=2, debug=False)
except Exception as error:
xml = '<error>' + str(error) + '</error>\n'
return xml return xml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment