mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 01:25:55 +02:00
CmdAuthInfo: Fix no output
jw-pkg.py projects get-auth-info doesn't print anything, fix that. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
7f85a5f2d6
commit
d7f9fc7260
1 changed files with 2 additions and 2 deletions
|
|
@ -35,14 +35,14 @@ class CmdGetAuthInfo(Cmd): # export
|
||||||
if re.match(r'^\s*$', line):
|
if re.match(r'^\s*$', line):
|
||||||
continue
|
continue
|
||||||
name, url, typ = re.split(r'\s+', line)
|
name, url, typ = re.split(r'\s+', line)
|
||||||
if name == 'origin' and typ == '(pull)': # TODO: Use other remotes, too?
|
if name == 'origin' and typ in ['(pull)', '(fetch)']: # TODO: Use other remotes, too?
|
||||||
parsed = urlparse(url)
|
parsed = urlparse(url)
|
||||||
for key in keys:
|
for key in keys:
|
||||||
result[key] = getattr(parsed, key)
|
result[key] = getattr(parsed, key)
|
||||||
base = parsed.geturl()
|
base = parsed.geturl()
|
||||||
base = re.sub(r'/jw-pkg', '', base)
|
base = re.sub(r'/jw-pkg', '', base)
|
||||||
base = re.sub(r'/proj$', '', base)
|
base = re.sub(r'/proj$', '', base)
|
||||||
url['remote-base'] = base
|
result['remote_base'] = base
|
||||||
break
|
break
|
||||||
|
|
||||||
# --- Print results
|
# --- Print results
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue