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/api/yubikey.py
2016-05-18 22:19:01 +01:00

14 lines
293 B
Python

import yubico
def get_all_yubikeys(debug):
keys = []
try:
skip = 0
while skip < 255:
key = yubico.find_yubikey(debug=debug, skip=skip)
keys.append(key)
skip += 1
except yubico.yubikey.YubiKeyError:
pass
return keys