|
|
|
@ -13,17 +13,23 @@ log = logging.getLogger(__name__)
|
|
|
|
|
def main():
|
|
|
|
|
fmt = '%(asctime)s %(levelname)-12s %(message)-100s [%(filename)s:%(lineno)d]'
|
|
|
|
|
p = argparse.ArgumentParser()
|
|
|
|
|
p.add_argument('-v', '--verbose', action='count', default=0,
|
|
|
|
|
help='increase the the logging verbosity')
|
|
|
|
|
g = p.add_mutually_exclusive_group()
|
|
|
|
|
g.add_argument('-v', '--verbose', default=0, action='count')
|
|
|
|
|
g.add_argument('-q', '--quiet', default=False, action='store_true')
|
|
|
|
|
|
|
|
|
|
p.add_argument('-c', dest='command', type=str, default=None,
|
|
|
|
|
help='command to run under the SSH agent')
|
|
|
|
|
p.add_argument('identity', type=str, nargs='*',
|
|
|
|
|
help='proto://[user@]host[:port][/path]')
|
|
|
|
|
args = p.parse_args()
|
|
|
|
|
|
|
|
|
|
verbosity = [logging.WARNING, logging.INFO, logging.DEBUG]
|
|
|
|
|
level = verbosity[min(args.verbose, len(verbosity) - 1)]
|
|
|
|
|
logging.basicConfig(level=level, format=fmt)
|
|
|
|
|
loglevel = logging.INFO
|
|
|
|
|
if args.verbose:
|
|
|
|
|
loglevel = logging.DEBUG
|
|
|
|
|
if args.quiet:
|
|
|
|
|
loglevel = logging.WARNING
|
|
|
|
|
|
|
|
|
|
logging.basicConfig(level=loglevel, format=fmt)
|
|
|
|
|
|
|
|
|
|
with trezor.Client(factory=trezor.TrezorLibrary) as client:
|
|
|
|
|
public_keys = []
|
|
|
|
|