mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
gpo: Ensure empty Security sections are removed
Failing to remove the empty section causes tests to fail, and is also just bad practice. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
c27c97ab55
commit
ff4279575f
@ -1986,6 +1986,8 @@ PasswordComplexity Password must meet complexity requirements
|
||||
inf_data.set(section, policy, value)
|
||||
else:
|
||||
inf_data.remove_option(section, policy)
|
||||
if len(inf_data.options(section)) == 0:
|
||||
inf_data.remove_section(section)
|
||||
|
||||
out = StringIO()
|
||||
inf_data.write(out)
|
||||
|
@ -1 +0,0 @@
|
||||
^samba.tests.samba_tool.gpo.samba.tests.samba_tool.gpo.GpoCmdTestCase.test_security_nonempty_sections
|
Loading…
Reference in New Issue
Block a user