Commit 300e190
pwclient: use argparse's error() function for bad input
This reduces the boilerplate we need and provides a more consistent help
output. e.g.:
$ pwclient update -s FOO -c 1337 314159 1234567
usage: pwclient update [--help] [-h HASH] [-p PROJECT] [-c COMMIT-REF]
[-s STATE] [-a {yes,no}]
[ID [ID ...]]
pwclient update: error: Declining update with COMMIT-REF on multiple IDs
Signed-off-by: Brian Norris <[email protected]>
Reviewed-by: Mike Frysinger <[email protected]>
Reviewed-by: Stephen Finucane <[email protected]>1 parent 252844f commit 300e190
1 file changed
+5
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
| 496 | + | |
| 497 | + | |
500 | 498 | | |
501 | 499 | | |
502 | 500 | | |
| |||
515 | 513 | | |
516 | 514 | | |
517 | 515 | | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
| 516 | + | |
523 | 517 | | |
524 | 518 | | |
525 | 519 | | |
| |||
529 | 523 | | |
530 | 524 | | |
531 | 525 | | |
532 | | - | |
533 | | - | |
534 | | - | |
| 526 | + | |
535 | 527 | | |
536 | 528 | | |
537 | 529 | | |
| |||
572 | 564 | | |
573 | 565 | | |
574 | 566 | | |
575 | | - | |
576 | | - | |
577 | | - | |
| 567 | + | |
578 | 568 | | |
579 | 569 | | |
580 | 570 | | |
| |||
0 commit comments