Skip to content

Commit 0d20d67

Browse files
zariiii9003felixdivo
authored andcommitted
fix VectorError bug
1 parent dcd771b commit 0d20d67

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

can/interfaces/vector/exceptions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
class VectorError(CanError):
88
def __init__(self, error_code, error_string, function):
9-
self.error_code = error_code
10-
super().__init__(f"{function} failed ({error_string})")
9+
super().__init__(
10+
message=f"{function} failed ({error_string})", error_code=error_code
11+
)
1112

1213
# keep reference to args for pickling
1314
self._args = error_code, error_string, function

test/test_vector.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ def test_called_without_testing_argument(self) -> None:
284284
# do not set the _testing argument, since it suppresses the exception
285285
can.Bus(channel=0, bustype="vector")
286286

287-
@unittest.skip("Fixing this is deferred until Vector is adjusted after #1025")
288287
def test_vector_error_pickle(self) -> None:
289288
error_code = 118
290289
error_string = "XL_ERROR"

0 commit comments

Comments
 (0)