Skip to content

Commit

Permalink
fix: improve forwards compatibility with spsdk 2.1+
Browse files Browse the repository at this point in the history
spsdk recently switched to the python-native Enum library and renamed the `desc` method to `get_description` in the process.
  • Loading branch information
kmohrf committed Apr 9, 2024
1 parent 600527e commit 2cadc3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pynitrokey/trussed/bootloader/lpc55.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ def path(self) -> str:
@property
def status(self) -> Tuple[int, str]:
code = self.device.status_code
message = StatusCode.desc(code)
try:
message = StatusCode.get_description(code)
except AttributeError:
message = StatusCode.desc(code)
return (code, message)

def close(self) -> None:
Expand Down

0 comments on commit 2cadc3f

Please sign in to comment.