From 31369ff4d3d8cd0ac39be32effc7151186f35001 Mon Sep 17 00:00:00 2001 From: Tymoteusz Motylewski Date: Thu, 8 Apr 2021 11:54:53 +0000 Subject: [PATCH] [IMP] tools: display full path in error message Show full path to not found addons folder to ease debugging. Before: error: option --addons-path: no such directory: '../non-existing' After: error: option --addons-path: no such directory: '/home/user/Odoo/non-existing' This message is local to developer and never displayed to the enduser closes odoo/odoo#68959 Signed-off-by: Martin Trigaux (mat) --- odoo/tools/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/tools/config.py b/odoo/tools/config.py index cba1786798d..7ef79f471b5 100644 --- a/odoo/tools/config.py +++ b/odoo/tools/config.py @@ -556,7 +556,7 @@ class configmanager(object): path = path.strip() res = os.path.abspath(os.path.expanduser(path)) if not os.path.isdir(res): - raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, path)) + raise optparse.OptionValueError("option %s: no such directory: %r" % (opt, res)) if not self._is_addons_path(res): raise optparse.OptionValueError("option %s: the path %r is not a valid addons directory" % (opt, path)) ad_paths.append(res)