From e95f91aff882fa950772f0d6d568460586a74e9e Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 19 Nov 2025 20:00:13 +0100 Subject: [PATCH] CmdGetAuthInfo: Fix: Suppress user name "None" Don't print username="None" if there's no such user Signed-off-by: Jan Lindemann --- src/python/jw/build/cmds/CmdGetAuthInfo.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/python/jw/build/cmds/CmdGetAuthInfo.py b/src/python/jw/build/cmds/CmdGetAuthInfo.py index 4f7a8906..fc7a24f0 100644 --- a/src/python/jw/build/cmds/CmdGetAuthInfo.py +++ b/src/python/jw/build/cmds/CmdGetAuthInfo.py @@ -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]}"')