summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-11-09 09:01:29 +0100
committerAndrew Bartlett <abartlet@samba.org>2012-11-13 22:14:14 +1100
commit11f5d54cbb10fd5c5f0e1718427609709c3476f4 (patch)
tree8c3e22e949928f10d9655223eb2a16dd11a5fb8a /source4
parent1ecc76b2480c884a66e598ff6b1f9000bb0931c0 (diff)
downloadsamba-11f5d54cbb10fd5c5f0e1718427609709c3476f4.tar.gz
samba-11f5d54cbb10fd5c5f0e1718427609709c3476f4.tar.xz
samba-11f5d54cbb10fd5c5f0e1718427609709c3476f4.zip
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>
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/netcmd/testparm.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/testparm.py b/source4/scripting/python/samba/netcmd/testparm.py
index 34c8fa50fcb..92514694218 100644
--- a/source4/scripting/python/samba/netcmd/testparm.py
+++ b/source4/scripting/python/samba/netcmd/testparm.py
@@ -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)