From 3994d26220e57c6dd6b66e85e4c1d6a843baa9d7 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 10 Oct 2012 09:13:31 -0400 Subject: [PATCH] bin: add explicit --version options for Python 3.3. --- bin/get-info.py | 5 ++++- bin/pinentry.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/get-info.py b/bin/get-info.py index 9f0f50f..e9f526b 100755 --- a/bin/get-info.py +++ b/bin/get-info.py @@ -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') diff --git a/bin/pinentry.py b/bin/pinentry.py index 2b42673..3649576 100755 --- a/bin/pinentry.py +++ b/bin/pinentry.py @@ -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') -- 2.26.2