Corrected custom port handling

This pillar was only able to connect to a Postgres DB running on the default port (5432)
This commit extend this to a custom port
This commit is contained in:
Sebastien Huber 2017-09-25 10:00:52 +02:00 committed by GitHub
parent 6bbd50c453
commit 78137c0860

View File

@ -90,7 +90,8 @@ class POSTGRESExtPillar(SqlBaseExtPillar):
conn = psycopg2.connect(host=_options['host'],
user=_options['user'],
password=_options['pass'],
dbname=_options['db'])
dbname=_options['db'],
port=_options['port'])
cursor = conn.cursor()
try:
yield cursor