Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfffb23c

Browse files
author
vshepard
committed
Add tunnel_port to remote_ops.py
1 parent48594f6 commitfffb23c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎testgres/operations/remote_ops.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def __init__(self, conn_params: ConnectionParams):
5858
self.remote=True
5959
self.username=conn_params.usernameorself.get_user()
6060
self.tunnel_process=None
61+
self.tunnel_port=None
6162

6263
def__enter__(self):
6364
returnself
@@ -410,6 +411,7 @@ def db_connect(self, dbname, user, password=None, host="localhost", port=5432):
410411
Establish SSH tunnel and connect to a PostgreSQL database.
411412
"""
412413
local_port=reserve_port()
414+
self.tunnel_port=local_port
413415
self.establish_ssh_tunnel(local_port=local_port,remote_port=port)
414416
try:
415417
conn=pglib.connect(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp