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:
parent
eb9a801b32
commit
24e32f5790
@ -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 = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user