[FIX] db dump: report errors due to missing password + pass PGPASSWORD even on Unix
authorOlivier Dony <odo@openerp.com>
Tue, 31 Jan 2012 11:08:49 +0000 (12:08 +0100)
committerOlivier Dony <odo@openerp.com>
Tue, 31 Jan 2012 11:08:49 +0000 (12:08 +0100)
commitf11e1de5eb1c68edf272a3448dc380a81af639fa
tree4581411fd10d2d6c455ebc93469c6d9a5e8e5d39
parenta6c106365a0a1ea7d7e2b28a57f08d8d6dea259e
[FIX] db dump: report errors due to missing password + pass PGPASSWORD even on Unix

Even on Unix systems the PGPASSWORD env var
is necessary when Postgres is configured to
deny unix socket connections or to require
a password anyway. This avoids asking admins
to manually create a ~/.pgpass file in order
to use the dump/restore tools.
Also did some cleanup to ensure the PGPASSWORD
var is removed from the environment as soon
as the operation is done.

lp bug: https://launchpad.net/bugs/790164 fixed
lp bug: https://launchpad.net/bugs/919100 fixed

bzr revid: odo@openerp.com-20120131110849-tji6ipjovxc9oi4v
openerp/service/web_services.py