From d126529d1bfece52cb0ff1fc2f66123df34b2cb0 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 16 Jan 2017 13:57:01 +0100 Subject: [PATCH] [FIX] base: avoid traceback when rendering traceback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If node is not installed (missing dependency), the user is not aware of the source of the issue as it can not be displayed in the css_errors or logger. The error is /usr/bin/env: ‘node’: No such file or directory which contains unicode quotes. Does not fix #15057 but at least say the source of the problem. --- odoo/addons/base/ir/ir_qweb/assetsbundle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/addons/base/ir/ir_qweb/assetsbundle.py b/odoo/addons/base/ir/ir_qweb/assetsbundle.py index 4beb8f1daaa..72b8a527e2b 100644 --- a/odoo/addons/base/ir/ir_qweb/assetsbundle.py +++ b/odoo/addons/base/ir/ir_qweb/assetsbundle.py @@ -390,7 +390,7 @@ class AssetsBundle(object): def get_preprocessor_error(self, stderr, source=None): """Improve and remove sensitive information from sass/less compilator error messages""" - error = stderr.split('Load paths')[0].replace(' Use --trace for backtrace.', '') + error = misc.ustr(stderr).split('Load paths')[0].replace(' Use --trace for backtrace.', '') if 'Cannot load compass' in error: error += "Maybe you should install the compass gem using this extra argument:\n\n" \ " $ sudo gem install compass --pre\n"