pmb: flasher: require action argument

With this patch, "pmbootstrap flasher" will fail with "the following
arguments are required: action_flasher". Without it, it just prints
"Done" and quits.
This commit is contained in:
Oliver Smith 2018-07-15 23:33:06 +02:00 committed by Martijn Braam
parent 4844719b1d
commit b0d4244b38
1 changed files with 2 additions and 1 deletions

View File

@ -39,9 +39,10 @@ def arguments_export(subparser):
def arguments_flasher(subparser):
ret = subparser.add_parser("flasher", help="flash something to the"
" target device")
sub = ret.add_subparsers(dest="action_flasher")
ret.add_argument("--method", help="override flash method",
dest="flash_method", default=None)
sub = ret.add_subparsers(dest="action_flasher")
sub.required = True
# Boot, flash kernel
boot = sub.add_parser("boot", help="boot a kernel once")