Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bellows/ezsp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,11 +362,11 @@ async def get_board_info(
patch, ver_info_bytes = t.uint8_t.deserialize(ver_info_bytes)
special, ver_info_bytes = t.uint8_t.deserialize(ver_info_bytes)
version = f"{major}.{minor}.{patch}.{special} build {build}"
build_string = None

try:
build_string = await self.xncp_get_build_string()
except InvalidCommandError:
build_string = None
if FirmwareFeatures.BUILD_STRING in self._xncp_features:
with contextlib.suppress(InvalidCommandError):
build_string = await self.xncp_get_build_string()

if build_string:
version = f"{version} ({build_string})"
Expand Down
3 changes: 3 additions & 0 deletions tests/test_ezsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ async def replacement(command_name, tokenId=None, valueId=None):

return replacement

if not isinstance(xncp_build_string, InvalidCommandError):
ezsp_f._xncp_features |= xncp.FirmwareFeatures.BUILD_STRING

with patch.object(
ezsp_f,
"_command",
Expand Down
Loading