Skip to content

Commit

Permalink
[FIX] config: fix pg_dump not found
Browse files Browse the repository at this point in the history
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 #45354

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
  • Loading branch information
jvm-odoo committed Feb 14, 2020
1 parent 7485927 commit f080964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion odoo/tools/config.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def verify_admin_password(self, password):


def _normalize(self, path): def _normalize(self, path):
if not path: if not path:
return path return ''
return realpath(abspath(expanduser(expandvars(path.strip())))) return realpath(abspath(expanduser(expandvars(path.strip()))))




Expand Down

0 comments on commit f080964

Please sign in to comment.