From db9bf1826d2d5f00d4fffc858c05041c77a6f34d Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 18 Mar 2026 05:53:14 +0100 Subject: [PATCH] cmds.projects.CmdListRepos: Use new SSHClient API Use SSHClient as an ExecContext, i.e. use the .run() method instead of .run_cmd(). Also, let SSHClient decide which implementation to use. Signed-off-by: Jan Lindemann --- src/python/jw/pkg/cmds/projects/CmdListRepos.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/python/jw/pkg/cmds/projects/CmdListRepos.py b/src/python/jw/pkg/cmds/projects/CmdListRepos.py index 5dc5af2a..f70c4d85 100644 --- a/src/python/jw/pkg/cmds/projects/CmdListRepos.py +++ b/src/python/jw/pkg/cmds/projects/CmdListRepos.py @@ -32,14 +32,14 @@ class CmdListRepos(Cmd): # export match url.scheme: case 'ssh': if re.match(r'ssh://.*git\.janware\.com/', args.base_url): - from jw.pkg.lib.SSHClient import SSHClientCmd as SSHClient - ssh = SSHClient(hostname=url.hostname) + from jw.pkg.lib.SSHClient import ssh_client + ssh = ssh_client(args.base_url) if username is not None: ssh.set_username(username) if password is not None: ssh.set_password(password) cmd = ['/opt/jw-pkg/bin/git-srv-admin.sh', '-u', args.from_owner, '-j', 'list-personal-projects'] - stdout, stderr, code = await ssh.run_cmd(cmd) + stdout, stderr, code = await ssh.run(cmd) print(stdout) return case 'https':