Skip to content

Commit

Permalink
add --version option
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Jan 23, 2017
1 parent 9d6950f commit 7852e65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Release Notes
0.3.1 (unreleased)
------------------

* No changes yet.
* Add ``--version`` option.

0.3.0 (2017-01-18)
------------------
Expand Down
3 changes: 3 additions & 0 deletions hpsspy/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ def main():
from sys import argv
from os import environ
from os.path import basename, join, splitext
from . import __version__ as hpsspyVersion
#
# Options
#
Expand Down Expand Up @@ -360,6 +361,8 @@ def main():
parser.add_argument('-v', '--verbose', action='store_true',
dest='verbose',
help="Increase verbosity.")
parser.add_argument('-V', '--version', action='version',
version="%(prog)s " + hpsspyVersion)
parser.add_argument('config', metavar='FILE',
help="Read configuration from FILE.")
parser.add_argument('release', metavar='SECTION',
Expand Down

0 comments on commit 7852e65

Please sign in to comment.