summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-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 34c8fa50fc..9251469421 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)