From dcf8b5e830152f4d92842f2371dad1b514b157a0 Mon Sep 17 00:00:00 2001 From: "Sejal Bhut (OpenERP Trainee)" Date: Mon, 3 Jun 2013 14:56:30 +0530 Subject: [PATCH] [FIX] Database Backup Problem lp bug: https://launchpad.net/bugs/1100721 fixed bzr revid: sejalpatel125@gmail.com-20130603092630-3rh4bewi3kihmub7 --- openerp/service/db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openerp/service/db.py b/openerp/service/db.py index a480b65440a..4901ceef4d6 100644 --- a/openerp/service/db.py +++ b/openerp/service/db.py @@ -197,7 +197,7 @@ def exp_drop(db_name): return True @contextlib.contextmanager -def _set_pg_password_in_environment(self): +def _set_pg_password_in_environment(): """ On systems where pg_restore/pg_dump require an explicit password (i.e. when not connecting via unix sockets, and most importantly on Windows), it is necessary to pass the PG user @@ -213,10 +213,10 @@ def _set_pg_password_in_environment(self): SaaS (giving SaaS users the super-admin password is not a good idea anyway) """ - if os.environ.get('PGPASSWORD') or not tools.config['db_password']: + if os.environ.get('PGPASSWORD') or not openerp.tools.config['db_password']: yield else: - os.environ['PGPASSWORD'] = tools.config['db_password'] + os.environ['PGPASSWORD'] = openerp.tools.config['db_password'] try: yield finally: