mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
lib.ec.SSHClient: Add property port
Add a port property to SSHClient, parsed from the ctor's URL, to supply the obvious information. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
3a84408436
commit
279b7789e2
1 changed files with 5 additions and 0 deletions
|
|
@ -27,6 +27,7 @@ class SSHClient(ExecContext):
|
|||
log(ERR, f'Failed to parse SSH URI "{uri}"')
|
||||
raise
|
||||
self.__hostname = parsed.hostname
|
||||
self.__port = parsed.port
|
||||
self.__password = parsed.password
|
||||
self.__username = parsed.username
|
||||
|
||||
|
|
@ -107,6 +108,10 @@ class SSHClient(ExecContext):
|
|||
def hostname(self):
|
||||
return self.__hostname
|
||||
|
||||
@property
|
||||
def port(self):
|
||||
return self.__port
|
||||
|
||||
def set_password(self, password: str) -> None:
|
||||
self.__password = password
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue