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

testgres/operations/remote_ops.py

Lines changed: 2 additions & 2 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy