[PATCH 2/3] pwclient: drop superfluous 'version' assignment

Brian Norris computersforpeace at gmail.com
Thu May 21 16:36:02 AEST 2015


The 'version' argument is only necessary if we want to show version
information (and we do not).

Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 apps/patchwork/bin/pwclient | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/apps/patchwork/bin/pwclient b/apps/patchwork/bin/pwclient
index c05315afb189..f2cec63492de 100755
--- a/apps/patchwork/bin/pwclient
+++ b/apps/patchwork/bin/pwclient
@@ -354,7 +354,7 @@ class _RecursiveHelpAction(argparse._HelpAction):
         parser.exit()
 
 def main():
-    hash_parser = argparse.ArgumentParser(add_help=False, version=False)
+    hash_parser = argparse.ArgumentParser(add_help=False)
     hash_parser.add_argument(
         '-h', metavar='HASH', dest='hash', action='store',
         help='''Lookup by patch hash'''
@@ -368,7 +368,7 @@ def main():
         help='''Lookup patch in project'''
     )
 
-    filter_parser = argparse.ArgumentParser(add_help=False, version=False)
+    filter_parser = argparse.ArgumentParser(add_help=False)
     filter_parser.add_argument(
         '-s', metavar='STATE',
         help='''Filter by patch state (e.g., 'New', 'Accepted', etc.)'''
@@ -407,7 +407,7 @@ def main():
         'patch_name', metavar='STR', nargs='?',
         help='substring to search for patches by name',
     )
-    help_parser = argparse.ArgumentParser(add_help=False, version=False)
+    help_parser = argparse.ArgumentParser(add_help=False)
     help_parser.add_argument(
         '--help', action='help', help=argparse.SUPPRESS,
         #help='''show this help message and exit'''
@@ -416,7 +416,6 @@ def main():
     action_parser = argparse.ArgumentParser(
         prog='pwclient',
         add_help=False,
-        version=False,
         formatter_class=argparse.RawDescriptionHelpFormatter,
         epilog='''(apply | get | info | view | update) (-h HASH | ID [ID ...])''',
     )
-- 
2.4.1



More information about the Patchwork mailing list