Allow enabling experimental devices from environment variable (#1194)

This commit is contained in:
Steven B.
2024-10-29 09:30:30 +00:00
committed by GitHub
parent d30d116f37
commit 4aec9d302f
6 changed files with 75 additions and 22 deletions

View File

@@ -214,9 +214,9 @@ def get_protocol(
"SMART.KLAP": (SmartProtocol, KlapTransportV2),
}
if not (prot_tran_cls := supported_device_protocols.get(protocol_transport_key)):
from .experimental.enabled import Enabled
from .experimental import Experimental
if Enabled.value and protocol_transport_key == "SMART.AES.HTTPS":
if Experimental.enabled() and protocol_transport_key == "SMART.AES.HTTPS":
prot_tran_cls = (SmartCameraProtocol, SslAesTransport)
else:
return None