Skip to content
Permalink
Browse files

[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
  • Loading branch information
jvm-odoo committed Feb 14, 2020
1 parent 873bc34 commit f90daac4ac2967104a06b6fe31f6313389da7e61
Showing with 2 additions and 2 deletions.
  1. +2 −2 odoo/tools/config.py
@@ -709,8 +709,8 @@ def verify_admin_password(self, password):
return True

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


0 comments on commit f90daac

Please sign in to comment.
You can’t perform that action at this time.