From db3e5716b3977719d0bd9a65f615cc8475078f81 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 20 May 2015 11:09:05 +0200 Subject: [PATCH] [FIX] ir_attachment: write traceback to logs when upload fail When the upload of an attachment failed, e.g. for access rights reasons, the traceback wasn't written or returned anywhere, preventing the easy debugging. opw-640242 --- addons/web/controllers/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 3ebbfb02af6..8b3a21fdee8 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1168,6 +1168,7 @@ class Binary(http.Controller): } except Exception: args = {'error': "Something horrible happened"} + _logger.exception("Fail to upload attachment %s" % ufile.filename) return out % (simplejson.dumps(callback), simplejson.dumps(args)) @http.route([