mirror of
https://github.com/samba-team/samba.git
synced 2025-07-21 12:59:09 +03:00
samba-tool: Improve "delegation" command error message
Write a more specific error msg when the on|off arg is invalid
This commit is contained in:
committed by
Jelmer Vernooij
parent
9ff2874e5e
commit
967ac70a35
@ -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)
|
||||
|
Reference in New Issue
Block a user