This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
yubi-lock/yubi_lock/status/cli.py
2016-05-18 22:19:01 +01:00

10 lines
281 B
Python

import click
from yubi_lock.api.yubikey import get_all_yubikeys
@click.command('status', short_help='List connected devices.')
def cli():
print('Scanning for keys...')
keys = get_all_yubikeys(False)
for key in keys:
print("Found {}!".format(key.description))