aboutsummaryrefslogtreecommitdiff
path: root/bench.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2020-01-27 23:30:40 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2020-01-27 23:31:45 +0100
commit0c85f85904010e8ddf9653d16857a94ec40c1e7f (patch)
tree775f2646712883f0aaca27de89a6ce4ebf0e060b /bench.py
parenteae8e1bf3d48beb5da48cb8f04df94a02c87bcb0 (diff)
downloadallocbench-0c85f85904010e8ddf9653d16857a94ec40c1e7f.tar.gz
allocbench-0c85f85904010e8ddf9653d16857a94ec40c1e7f.zip
use argparse version action to print allocbench version
Diffstat (limited to 'bench.py')
-rwxr-xr-xbench.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/bench.py b/bench.py
index 35a6b76..a10fe77 100755
--- a/bench.py
+++ b/bench.py
@@ -111,16 +111,13 @@ def main():
action='store_true')
parser.add_argument("--version",
help="print version info and exit",
- action='store_true')
+ action='version',
+ version=f"allocbench {src.facter.allocbench_version()}")
args = parser.parse_args()
if args.license:
print_license_and_exit()
- if args.version:
- print(src.facter.allocbench_version())
- sys.exit(0)
-
atexit.register(epilog)
# Set global verbosity