allow custom driver factories

This commit is contained in:
Gilles Boccon-Gibod
2023-06-17 18:10:37 -07:00
parent 03538d0f8a
commit 41ce311836
4 changed files with 8 additions and 12 deletions

View File

@@ -61,7 +61,7 @@ async def get_driver_for_host(host):
"""Probe all known diver classes until one returns a valid instance for a host,
or none is found.
"""
if (driver := await rtk.Driver.for_host(host)):
if driver := await rtk.Driver.for_host(host):
logger.debug("Instantiated RTK driver")
return driver

View File

@@ -256,7 +256,7 @@ class Firmware:
chip_id,
firmware[patch_offset : patch_offset + patch_length - 4]
+ struct.pack("<I", self.version),
svn_version
svn_version,
)
)