Mercurial > odfcast > odfcast
comparison odfcast/convert.py @ 41:a1100ec32be2
Log exception on rendering errors
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 20 Oct 2014 16:16:53 +0200 |
parents | 89ffa12bd48d |
children | 6d511e93a331 |
comparison
equal
deleted
inserted
replaced
40:8a3f3427aa15 | 41:a1100ec32be2 |
---|---|
61 t = Template(outfile, tfile) | 61 t = Template(outfile, tfile) |
62 t.render(datadict) | 62 t.render(datadict) |
63 outfile.close() | 63 outfile.close() |
64 outfile = tfile | 64 outfile = tfile |
65 except: | 65 except: |
66 log.exception("Template error") | |
66 return "Template error", 500 | 67 return "Template error", 500 |
67 | 68 |
68 if fformat != "odt": | 69 if fformat != "odt": |
69 try: | 70 try: |
70 outfile = self.convert(outfile, fformat) | 71 outfile = self.convert(outfile, fformat) |