From 49140ca8344b2baedd1676719121f16b58d1cf1b Mon Sep 17 00:00:00 2001 From: jvm-odoo Date: Fri, 14 Feb 2020 06:52:27 +0000 Subject: [PATCH] [FIX] config: fix pg_dump not found Issue - Remove ~/.odoorc - Launch a server - Try to dump the db in db manager Ok - Restart the server - Retry pg_dump not found Cause When the .odoorc file is not there, the pg_path option is not present so the normalize method set it to None When the server is restarted, it re-checks the options (which are strings) and in the normalize method we check "if not pg_path" but 'None' is truthy so it thinks this is a real path. Solution Check if not pg_path or if pg_path string is None OPW-2189789 closes odoo/odoo#45369 X-original-commit: f080964694c01a79c52e05c0ceb42c18d4c77df5 Signed-off-by: Nicolas Martinelli (nim) --- 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 79978fd1d0c..03a08710f4f 100644 --- a/odoo/tools/config.py +++ b/odoo/tools/config.py @@ -711,7 +711,7 @@ class configmanager(object): def _normalize(self, path): if not path: - return path + return '' return realpath(abspath(expanduser(expandvars(path.strip()))))