Skip to content

Fix Systec error message lookup - #2081

Open
giri256 wants to merge 1 commit into
hardbyte:mainfrom
giri256:fix/systec-error-code
Open

Fix Systec error message lookup#2081
giri256 wants to merge 1 commit into
hardbyte:mainfrom
giri256:fix/systec-error-code

Conversation

@giri256

@giri256 giri256 commented Jul 26, 2026

Copy link
Copy Markdown

Fixes #2077.

The Systec backend passes a ctypes return-code object into its exception class. Looking up that object directly in the error-message table raises TypeError because it is not hashable, hiding the actual USB-CAN error.

The lookup now uses the numeric .value, while the original result object remains available on the exception. I also added a regression test and changelog entry.

Tests:

  • pytest test/test_systec.py -q — 18 passed
  • Ruff and Black checks passed

@mergify

mergify Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Signed-off-by: p1 <giridharpavan593@gmail.com>
@giri256
giri256 force-pushed the fix/systec-error-code branch from 879d022 to b0f2f90 Compare July 27, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unhashable type for Systec interface errors

1 participant