Mercurial > odfcast
changeset 84:3492c79d83c8
Log convert activity.
author | Frank Koormann <frank.koormann@intevation.de> |
---|---|
date | Thu, 02 Apr 2015 15:45:01 +0200 |
parents | bb2b32455a6b |
children | c018570c1a2d |
files | odfcast/convert.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/odfcast/convert.py Fri Mar 20 17:02:44 2015 +0100 +++ b/odfcast/convert.py Thu Apr 02 15:45:01 2015 +0200 @@ -119,6 +119,7 @@ return fformat and fformat.lower() in ALLOWED_FORMATS def post(self): + log.debug("Converting document") ffile = request.files['file'] if not ffile.filename: return ErrorResponse( @@ -135,8 +136,13 @@ datadict = self.get_datadict() + if datadict: + log.debug(" with datadict") + mimetype = self.get_mimetype_for_format(fformat) + log.debug(" to %s" % fformat) + outfile = self.save_form_file(ffile) if datadict: @@ -157,6 +163,7 @@ log.exception("Conversion error") return ConversionErrorResponse(details=str(e)) + log.debug("Document converted") return Response(outfile, mimetype=mimetype) def get(self):