Skip to content

Commit 842edb7

Browse files
committed
fix: added 'localhost' value for host var to avoid empty host var
1 parent 7e3fdd9 commit 842edb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mamonsu/plugins/pgsql/driver/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ConnectionInfo(object):
1212
def __init__(self, connection_hash=None):
1313
if connection_hash is None:
1414
connection_hash = {}
15-
self.host = connection_hash.get('host') or os.environ.get('PGHOST')
15+
self.host = connection_hash.get('host') or (os.environ.get('PGHOST') or "localhost")
1616
self.port = connection_hash.get('port') or int(os.environ.get('PGPORT') or 5432)
1717
self.user = connection_hash.get('user') or os.environ.get('PGUSER')
1818
self.passwd = connection_hash.get('passwd') or os.environ.get('PGPASSWORD')

0 commit comments

Comments
 (0)