[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) <mat@odoo.com>
This commit is contained in:
committed by
Martin Trigaux
parent
b98b1c0227
commit
31369ff4d3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user