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

Commitc92794c

Browse files
author
vshepard
committed
Add port to connection parameters
1 parent356cd52 commitc92794c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎testgres/operations/os_ops.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010

1111

1212
classConnectionParams:
13-
def__init__(self,host='127.0.0.1',ssh_key=None,username=None):
13+
def__init__(self,host='127.0.0.1',port=None,ssh_key=None,username=None):
1414
self.host=host
15+
self.port=port
1516
self.ssh_key=ssh_key
1617
self.username=username
1718

‎testgres/operations/remote_ops.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ def __init__(self, conn_params: ConnectionParams):
4545
self.conn_params=conn_params
4646
self.host=conn_params.host
4747
self.ssh_key=conn_params.ssh_key
48+
self.port=conn_params.port
4849
ifself.ssh_key:
4950
self.ssh_cmd= ["-i",self.ssh_key]
5051
else:
5152
self.ssh_cmd= []
53+
ifself.port:
54+
self.ssh_cmd= ["-p",self.port]
5255
self.remote=True
5356
self.username=conn_params.usernameorself.get_user()
5457
self.add_known_host(self.host)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp