Skip to content

Commit

Permalink
if port is none given to sqlutilpy I use 5432
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Nov 18, 2020
1 parent 53706fe commit 518b2a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/sqlutilpy/sqlutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def getConnection(db=None,
"""
if driver == 'psycopg2':
conn_str = "dbname=%s host=%s port=%d" % (db, host, port)
conn_str = "dbname=%s host=%s port=%d" % (db, host, (port or 5432))
if user is not None:
conn_str = conn_str + ' user=%s' % user
if password is not None:
Expand Down

0 comments on commit 518b2a3

Please sign in to comment.