Changed __init__-py
This commit is contained in:
@ -9,13 +9,13 @@ config.read([
|
||||
os.environ.get('STORE_CONFIG', '')
|
||||
])
|
||||
|
||||
PGPASS = '/nfsopt/mdevaluate/pgpass'
|
||||
if os.path.exists(PGPASS):
|
||||
with open(PGPASS) as f:
|
||||
for pgpass in f:
|
||||
hostname, *_, username, password = pgpass.split(':')
|
||||
if hostname == 'db.cluster' and username == 'store':
|
||||
config['store']['pg_password'] = password.strip()
|
||||
#PGPASS = '/nfsopt/mdevaluate/pgpass'
|
||||
#if os.path.exists(PGPASS):
|
||||
# with open(PGPASS) as f:
|
||||
# for pgpass in f:
|
||||
# hostname, *_, username, password = pgpass.split(':')
|
||||
# if hostname == 'db.cluster' and username == 'store':
|
||||
# config['store']['pg_password'] = password.strip()
|
||||
|
||||
# we sometimes have problems with the internal DNS, therefore try to resolve
|
||||
# the database host in advance and use IP directly
|
||||
|
Reference in New Issue
Block a user