diff options
author | David Mulder <dmulder@samba.org> | 2022-11-14 09:49:18 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-11-15 01:08:38 +0000 |
commit | 4321be515b41ac4b129e2334f19cfd628809cf3d (patch) | |
tree | 84bfe819d905a129264e25b4d0eacb8f06b682e4 | |
parent | f04f205d273605b0c09799cc55fc218ce907c827 (diff) | |
download | samba-4321be515b41ac4b129e2334f19cfd628809cf3d.tar.gz |
gp: Fix startup scripts list not fail with empty args
This fixes the startup scripts list command to
not fail when the parameters variable is empty.
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r-- | python/samba/netcmd/gpo.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py index 6bc3ddb459d..c255a1c1232 100644 --- a/python/samba/netcmd/gpo.py +++ b/python/samba/netcmd/gpo.py @@ -3126,8 +3126,12 @@ samba-tool gpo manage scripts startup list {31B2F340-016D-11D2-945F-00C04FB984F9 run_as = run_as.text else: run_as = 'root' + if parameters is not None: + parameters = parameters.text + else: + parameters = '' self.outf.write('@reboot %s %s %s\n' % (run_as, script_path, - parameters.text)) + parameters)) class cmd_add_startup(Command): """Adds VGP Startup Script Group Policy to the sysvol |