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

Commit013b359

Browse files
author
vshepard
committed
Add tunnel_port to remote_ops.py
1 parent22d3251 commit013b359

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
@@ -56,6 +56,7 @@ def __init__(self, conn_params: ConnectionParams):
5656
self.remote=True
5757
self.username=conn_params.usernameorself.get_user()
5858
self.tunnel_process=None
59+
self.tunnel_port=None
5960

6061
def__enter__(self):
6162
returnself
@@ -408,6 +409,7 @@ def db_connect(self, dbname, user, password=None, host="localhost", port=5432):
408409
Establish SSH tunnel and connect to a PostgreSQL database.
409410
"""
410411
local_port=reserve_port()
412+
self.tunnel_port=local_port
411413
self.establish_ssh_tunnel(local_port=local_port,remote_port=port)
412414
try:
413415
conn=pglib.connect(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp