]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool: Improve "delegation" command error message
authorGiampaolo Lauria <lauria2@yahoo.com>
Fri, 21 Oct 2011 15:57:34 +0000 (11:57 -0400)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 3 Nov 2011 14:12:27 +0000 (15:12 +0100)
Write a more specific error msg when the on|off arg is invalid

source4/scripting/python/samba/netcmd/delegation.py

index ec84f671bc9edb737ed7e4b66bbc35b27cc9d9d5..49849870ddcf3480fea3b53199ed6a0f98e2e0d3 100644 (file)
@@ -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)