summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorGiampaolo Lauria <lauria2@yahoo.com>2011-10-21 11:57:34 -0400
committerJelmer Vernooij <jelmer@samba.org>2011-11-03 15:12:27 +0100
commit967ac70a35e8f42d0687c5b46013820c0bec37f9 (patch)
tree118d1986948df8e3d6fb665eee6503978252d6a0 /source4/scripting
parent9ff2874e5e89ac297be972e0a6ef793456480a56 (diff)
downloadsamba-967ac70a35e8f42d0687c5b46013820c0bec37f9.tar.gz
samba-967ac70a35e8f42d0687c5b46013820c0bec37f9.tar.bz2
samba-967ac70a35e8f42d0687c5b46013820c0bec37f9.zip
samba-tool: Improve "delegation" command error message
Write a more specific error msg when the on|off arg is invalid
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/netcmd/delegation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/netcmd/delegation.py b/source4/scripting/python/samba/netcmd/delegation.py
index ec84f671bc..49849870dd 100644
--- a/source4/scripting/python/samba/netcmd/delegation.py
+++ b/source4/scripting/python/samba/netcmd/delegation.py
@@ -90,7 +90,7 @@ class cmd_delegation_for_any_service(Command):
elif onoff == "off":
on = False
else:
- raise CommandError("Invalid argument [%s]" % onoff)
+ raise CommandError("invalid argument: '%s' (choose from 'on', 'off')" % onoff)
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)
@@ -124,7 +124,7 @@ class cmd_delegation_for_any_protocol(Command):
elif onoff == "off":
on = False
else:
- raise CommandError("Invalid argument [%s]" % onoff)
+ raise CommandError("invalid argument: '%s' (choose from 'on', 'off')" % onoff)
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp)