]> git.ipfire.org Git - thirdparty/patchwork.git/commit
pwclient: use argparse's error() function for bad input
authorBrian Norris <computersforpeace@gmail.com>
Fri, 16 Oct 2015 23:39:03 +0000 (16:39 -0700)
committerStephen Finucane <stephen.finucane@intel.com>
Tue, 20 Oct 2015 00:52:24 +0000 (01:52 +0100)
commit300e190370ccda0c78284f31b1ec077d2e94e247
tree435f6b3547aa6dbad772bb067d4d66ecdab1b27a
parent252844f51c9f84fe2858832f6b93bd9d41017392
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 <computersforpeace@gmail.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
patchwork/bin/pwclient