From a6255d2a3bd5d62e58f80b1f2c4fc100bf8c8236 Mon Sep 17 00:00:00 2001 From: Mathias Markl Date: Tue, 22 Aug 2017 09:35:41 +0200 Subject: [PATCH] Update main.py --- muk_web_preview_msoffice/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/muk_web_preview_msoffice/controllers/main.py b/muk_web_preview_msoffice/controllers/main.py index ad42676..99fcc9b 100644 --- a/muk_web_preview_msoffice/controllers/main.py +++ b/muk_web_preview_msoffice/controllers/main.py @@ -94,7 +94,7 @@ class MSOfficeParserController(http.Controller): return response except KeyError: return werkzeug.exceptions.UnsupportedMediaType(_("The file couldn't be converted. Unsupported mine type.")) - except (ImportError, IOError, WindowsError) as error: + except (ImportError, IOError, OSError) as error: _logger.error(error) return werkzeug.exceptions.InternalServerError(_("An error occurred during the process. Please contact your system administrator.")) @@ -120,4 +120,4 @@ class MSOfficeParserController(http.Controller): headers = [('Content-Type', 'application/pdf'), ('Content-Disposition', 'attachment;filename="{}";'.format(filename)), ('Content-Length', len(file))] - return request.make_response(file, headers) \ No newline at end of file + return request.make_response(file, headers)