Write a more specific error msg when the on|off arg is invalid
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)
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)