mirror of
https://github.com/samba-team/samba.git
synced 2025-12-16 00:23:52 +03:00
samba-tool: allow testparm to dump global section only
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15070 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: David Mulder <dmulder@suse.com>
This commit is contained in:
committed by
Douglas Bagnall
parent
1c6e59a7df
commit
5750d7a1d0
@@ -106,7 +106,10 @@ class cmd_testparm(Command):
|
||||
try:
|
||||
section = lp[section_name]
|
||||
except KeyError:
|
||||
raise CommandError("Unknown section %s" % section_name)
|
||||
if section_name in ['global', 'globals']:
|
||||
lp.dump_globals()
|
||||
else:
|
||||
raise CommandError(f"Unknown section {section_name}")
|
||||
else:
|
||||
section.dump(lp.default_service, verbose)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user