bin: add explicit --version options for Python 3.3.
authorW. Trevor King <wking@tremily.us>
Wed, 10 Oct 2012 13:13:31 +0000 (09:13 -0400)
committerW. Trevor King <wking@tremily.us>
Wed, 10 Oct 2012 13:13:31 +0000 (09:13 -0400)
bin/get-info.py
bin/pinentry.py

index 9f0f50f04479ee3df6d1fb788740a6027af6621a..e9f526b50d90a2dd8b914a9fe16334415a22f6ca 100755 (executable)
@@ -29,7 +29,10 @@ if __name__ == '__main__':
     import argparse
     import logging
 
-    parser = argparse.ArgumentParser(description=__doc__, version=__version__)
+    parser = argparse.ArgumentParser(description=__doc__)
+    parser.add_argument(
+        '-v', '--version', action='version',
+        version='%(prog)s {}'.format(__version__))
     parser.add_argument(
         '-V', '--verbose', action='count', default=0,
         help='increase verbosity')
index 2b4267347bd6e3b476cd10352282e09f696e9e97..36495766e91743ad4f18271ec1d4b8407923b4cc 100755 (executable)
@@ -336,7 +336,10 @@ if __name__ == '__main__':
     import logging
     import traceback
 
-    parser = argparse.ArgumentParser(description=__doc__, version=__version__)
+    parser = argparse.ArgumentParser(description=__doc__)
+    parser.add_argument(
+        '-v', '--version', action='version',
+        version='%(prog)s {}'.format(__version__))
     parser.add_argument(
         '-V', '--verbose', action='count', default=0,
         help='increase verbosity')