summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSejal Bhut (OpenERP Trainee) <sejalpatel125@gmail.com>2013-06-03 14:56:30 +0530
committerSejal Bhut (OpenERP Trainee) <sejalpatel125@gmail.com>2013-06-03 14:56:30 +0530
commitdcf8b5e830152f4d92842f2371dad1b514b157a0 (patch)
treef326a37482b9f0cd2bee1151887fb14909d0ee11
parent8c0dfaa9b8a9484ebcf86f494d5c39550b0a40d7 (diff)
[FIX] Database Backup Problem
lp bug: https://launchpad.net/bugs/1100721 fixed bzr revid: sejalpatel125@gmail.com-20130603092630-3rh4bewi3kihmub7
-rw-r--r--openerp/service/db.py6
1 files 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: