mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
otptoken_yubikey.py: Removed traceback when package missing.
IPA should suggest user to install dependent packages instead of throwing traceback. To work with IPA and Yubikey, packages libyubikey(not in official RHEL repo) and libusb are required. Resolves: https://pagure.io/freeipa/issue/6979 Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
parent
5f03329051
commit
76357283ec
@ -131,6 +131,9 @@ class otptoken_add_yubikey(Command):
|
||||
raise NotFound(reason="No YubiKey found: %s" % e.strerror)
|
||||
except yubico.yubikey.YubiKeyError as e:
|
||||
raise NotFound(reason=e.reason)
|
||||
except ValueError as e:
|
||||
raise NotFound(reason=str(e) + ". Please install 'libyubikey' "
|
||||
"and 'libusb' packages first.")
|
||||
|
||||
assert yk.version_num() >= (2, 1)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user