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