security/py-yubikey-manager: patch missing FreeBSD backend support
PR: 254580 Reported by: nwhitehorn
This commit is contained in:
parent
6c92546a2c
commit
99b3ddf04f
@ -1,5 +1,6 @@
|
||||
PORTNAME= yubikey-manager
|
||||
PORTVERSION= 4.0.2
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
@ -0,0 +1,21 @@
|
||||
--- ykman/hid/__init__.py.orig 2021-04-12 07:23:08 UTC
|
||||
+++ ykman/hid/__init__.py
|
||||
@@ -42,12 +42,15 @@ elif sys.platform.startswith("win32"):
|
||||
from . import windows as backend
|
||||
elif sys.platform.startswith("darwin"):
|
||||
from . import macos as backend
|
||||
+elif sys.platform.startswith("freebsd"):
|
||||
+ backend = None
|
||||
else:
|
||||
raise Exception("Unsupported platform")
|
||||
|
||||
-
|
||||
-list_otp_devices: Callable[[], List[OtpYubiKeyDevice]] = backend.list_devices
|
||||
-
|
||||
+if backend is not None:
|
||||
+ list_otp_devices: Callable[[], List[OtpYubiKeyDevice]] = backend.list_devices
|
||||
+else:
|
||||
+ list_otp_devices: Callable[[], List[OtpYubiKeyDevice]] = lambda: []
|
||||
|
||||
class CtapYubiKeyDevice(YkmanDevice):
|
||||
"""YubiKey FIDO USB HID device"""
|
Loading…
Reference in New Issue
Block a user