Skip to content

Commit 4e8b8de

Browse files
committed
Use CanInterfaceNotImplementedError when the CANtact module is missing
1 parent 42d47b6 commit 4e8b8de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

can/interfaces/cantact.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from unittest.mock import Mock
88

99
from can import BusABC, Message
10-
from ..exceptions import CanInitializationError, error_check
10+
from ..exceptions import CanInitializationError, CanInterfaceNotImplementedError, error_check
1111

1212
logger = logging.getLogger(__name__)
1313

@@ -63,7 +63,7 @@ def __init__(
6363
self.interface = MockInterface()
6464
else:
6565
if cantact is None:
66-
raise CanInitializationError(
66+
raise CanInterfaceNotImplementedError(
6767
"The CANtact module is not installed. Install it using `python -m pip install cantact`"
6868
)
6969
with error_check(

0 commit comments

Comments
 (0)