Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purge import hack from network.py #510

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading