Skip to content

Commit

Permalink
ixxat: Fix exception in 'state' property on bus coupling errors (#1647)
Browse files Browse the repository at this point in the history
BusState is not an exception type and should be raised (especially not in a property).
  • Loading branch information
henzef authored Aug 18, 2023
1 parent 3814254 commit fcf615d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion can/interfaces/ixxat/canlib_vcinpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ def state(self) -> BusState:
error_byte_2 = status.dwStatus & 0xF0
# CAN_STATUS_BUSCERR = 0x20 # bus coupling error
if error_byte_2 & constants.CAN_STATUS_BUSCERR:
raise BusState.ERROR
return BusState.ERROR

return BusState.ACTIVE

Expand Down

0 comments on commit fcf615d

Please sign in to comment.