This commit is contained in:
Jonathan Roelofs
2017-12-29 09:23:06 -07:00
parent 4cd7dc02eb
commit ec97cd0c44
2 changed files with 10 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ See these links for more details:
import argparse
import contextlib
import functools
import pkg_resources
import logging
import os
import re
@@ -252,5 +253,9 @@ def main(device_type):
p.add_argument('-v', '--verbose', default=0, action='count')
p.set_defaults(func=run_unlock)
version = pkg_resources.require("trezor-agent")[0].version
parser.add_argument('--version', help='Print the version info',
action='version', version='%(prog)s ' + version)
args = parser.parse_args()
return args.func(device_type=device_type, args=args)