cmds.CmdListRepos: Don't import from lib

Don't directly import from lib (i.e. from __init__.py), because that
won't work until "make all" has not run through, i.e. during fresh
checkout.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-18 20:09:23 +01:00
commit d484749b79

View file

@ -4,7 +4,7 @@ import re
from argparse import Namespace, ArgumentParser from argparse import Namespace, ArgumentParser
from ..Cmd import Cmd from ..Cmd import Cmd
from ..lib import SSHClientCmd, get_username, get_password, run_curl from ..lib.util import get_username, get_password, run_curl
class CmdListRepos(Cmd): # export class CmdListRepos(Cmd): # export
@ -28,7 +28,7 @@ class CmdListRepos(Cmd): # export
case 'ssh': case 'ssh':
password = get_password(args=args, url=args.base_url, askpass_env=['GIT_ASKPASS', 'SSH_ASKPASS']) password = get_password(args=args, url=args.base_url, askpass_env=['GIT_ASKPASS', 'SSH_ASKPASS'])
if re.match(r'ssh://.*git\.janware\.com/', args.base_url): if re.match(r'ssh://.*git\.janware\.com/', args.base_url):
from jw.build.lib import SSHClientCmd as SSHClient from jw.build.libSSHClientCmd import SSHClientCmd as SSHClient
ssh = SSHClient(hostname=url.hostname) ssh = SSHClient(hostname=url.hostname)
if username is not None: if username is not None:
ssh.set_username(username) ssh.set_username(username)