Skip to content

Commit fcf615d

Browse files
authored
ixxat: Fix exception in 'state' property on bus coupling errors (hardbyte#1647)
BusState is not an exception type and should be raised (especially not in a property).
1 parent 3814254 commit fcf615d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

can/interfaces/ixxat/canlib_vcinpl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ def state(self) -> BusState:
852852
error_byte_2 = status.dwStatus & 0xF0
853853
# CAN_STATUS_BUSCERR = 0x20 # bus coupling error
854854
if error_byte_2 & constants.CAN_STATUS_BUSCERR:
855-
raise BusState.ERROR
855+
return BusState.ERROR
856856

857857
return BusState.ACTIVE
858858

0 commit comments

Comments
 (0)