1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-22 18:50:15 +03:00

Fix for 'None' username dropping to runner_factory

This commit is contained in:
Игорь Чудов 2020-02-12 17:49:46 +04:00
parent eb9a801b32
commit 24e32f5790
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC

View File

@ -80,7 +80,10 @@ def runner_factory(args, target):
if is_root():
# Only root may specify any username to update.
try:
username = pwd.getpwnam(args.user).pw_name
if args.user:
username = pwd.getpwnam(args.user).pw_name
else:
target = 'Computer'
except:
username = None
logstring = (