Skip to content

Commit 2afcc92

Browse files
author
vshepard
committed
Update establish_ssh_tunnel
1 parent 013b359 commit 2afcc92

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: testgres/operations/remote_ops.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def db_connect(self, dbname, user, password=None, host="localhost", port=5432):
413413
self.establish_ssh_tunnel(local_port=local_port, remote_port=port)
414414
try:
415415
conn = pglib.connect(
416-
host=host,
416+
host='localhost',
417417
port=local_port,
418418
database=dbname,
419419
user=user,
@@ -423,7 +423,7 @@ def db_connect(self, dbname, user, password=None, host="localhost", port=5432):
423423
print("Database connection established successfully.")
424424
return conn
425425
except Exception as e:
426-
print(f"Error connecting to the database: {str(e)}")
426+
print(f"!!!Error connecting to the database: {str(e)}")
427427
if self.tunnel_process:
428428
self.tunnel_process.terminate()
429429
print("SSH tunnel closed due to connection failure.")

0 commit comments

Comments
 (0)