mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
CmdGetAuthInfo: Fix: Suppress user name "None"
Don't print username="None" if there's no such user Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
ae01ad6bdf
commit
e95f91aff8
1 changed files with 7 additions and 4 deletions
|
|
@ -36,7 +36,10 @@ class CmdGetAuthInfo(Cmd): # export
|
|||
result[key] = getattr(parsed, key)
|
||||
break
|
||||
for key in keys:
|
||||
if key in result and getattr(args, key, None):
|
||||
if not args.only_values:
|
||||
print(f'{key}=', end='')
|
||||
print(result[key])
|
||||
if key in result and getattr(args, key, None) == True:
|
||||
if key is None:
|
||||
continue
|
||||
if args.only_values:
|
||||
print(result[key])
|
||||
continue
|
||||
print(f'{key}="{result[key]}"')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue