1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s4:samba-tool/testparm: report a CommandError if loading of the config file fails

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2012-11-09 09:01:29 +01:00 committed by Andrew Bartlett
parent 1ecc76b248
commit 11f5d54cbb

View File

@ -82,7 +82,10 @@ class cmd_testparm(Command):
raise CommandError("Both a DNS name and an IP address are "
"required for the host access check")
lp = sambaopts.get_loadparm()
try:
lp = sambaopts.get_loadparm()
except RuntimeError, err:
raise CommandError(err)
# We need this to force the output
samba.set_debug_level(2)