Skip to content

Commit

Permalink
Purge import hack from network.py (#510)
Browse files Browse the repository at this point in the history
Always require dependencies to be installed.

Resolved #509
  • Loading branch information
erlend-aasland authored Jul 10, 2024
1 parent 55d870e commit a196e1e
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions canopen/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@
import threading
from typing import Callable, Dict, Iterator, List, Optional, Union

try:
import can
from can import Listener
from can import CanError
except ImportError:
# Do not fail if python-can is not installed
can = None
CanError = Exception
class Listener:
""" Dummy listener """
import can
from can import Listener
from can import CanError

from canopen.node import RemoteNode, LocalNode
from canopen.sync import SyncProducer
Expand Down

0 comments on commit a196e1e

Please sign in to comment.