From d4f92c07b3b34cfbc9bc83f376d15b21ca91f15d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 10 Oct 2012 08:47:09 -0400 Subject: [PATCH] send-pgp-mime: make `--version` a stand alone argument (for Python 3.3). --- bin/send-pgp-mime.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/send-pgp-mime.py b/bin/send-pgp-mime.py index 01f063a..64cde69 100755 --- a/bin/send-pgp-mime.py +++ b/bin/send-pgp-mime.py @@ -92,8 +92,10 @@ if __name__ == '__main__': parser = argparse.ArgumentParser( description = doc_lines[0], epilog = '\n'.join(doc_lines[1:]).strip(), - version=_pgp_mime.__version__, formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument( + '-v', '--version', action='version', + version='%(prog)s {}'.format(_pgp_mime.__version__)) parser.add_argument( '-e', '--encoding', metavar='ENCODING', default='utf-8', help='encoding for input files') -- 2.26.2