Use an explicit `version` action instead of the undocumented (and
deprecated) `version` keyword to ArgumentParser [1,2].
[1]: http://docs.python.org/3.3/library/argparse.html#action
[2]: http://docs.python.org/3.3/library/argparse.html#upgrading-optparse-code
Signed-off-by: W. Trevor King <wking@tremily.us>
`.parse_args()` call without modification.
"""
parser = _argparse.ArgumentParser(
- description=_PACKAGE_DOCSTRING, version=__version__)
+ prog='rss2email', description=_PACKAGE_DOCSTRING)
+ parser.add_argument(
+ '-v', '--version', action='version',
+ version='%(prog)s {}'.format(__version__))
parser.add_argument(
'-c', '--config', metavar='PATH', default=[], action='append',
help='path to the configuration file')