diff --git a/lib/logitech_receiver/__init__.py b/lib/logitech_receiver/__init__.py index e31407edac..46aa1f0a20 100644 --- a/lib/logitech_receiver/__init__.py +++ b/lib/logitech_receiver/__init__.py @@ -30,13 +30,6 @@ import logging -from . import listener, status # noqa: F401 -from .base import DeviceUnreachable, NoReceiver, NoSuchDevice # noqa: F401 -from .common import strhex # noqa: F401 -from .device import Device # noqa: F401 -from .hidpp20 import FeatureCallError, FeatureNotSupported # noqa: F401 -from .receiver import Receiver # noqa: F401 - logger = logging.getLogger(__name__) logger.setLevel(logging.root.level) # if logging.root.level > logging.DEBUG: diff --git a/lib/solaar/cli/__init__.py b/lib/solaar/cli/__init__.py index e77e179d09..5fc68f0dae 100644 --- a/lib/solaar/cli/__init__.py +++ b/lib/solaar/cli/__init__.py @@ -23,7 +23,9 @@ from importlib import import_module from traceback import extract_tb, format_exc -from logitech_receiver import Device, Receiver +import logitech_receiver.device as _device +import logitech_receiver.receiver as _receiver + from logitech_receiver.base import receivers, receivers_and_devices from solaar import NAME @@ -113,7 +115,7 @@ def _receivers(dev_path=None): if dev_path is not None and dev_path != dev_info.path: continue try: - r = Receiver.open(dev_info) + r = _receiver.Receiver.open(dev_info) if logger.isEnabledFor(logging.DEBUG): logger.debug('[%s] => %s', dev_info.path, r) if r: @@ -128,7 +130,7 @@ def _receivers_and_devices(dev_path=None): if dev_path is not None and dev_path != dev_info.path: continue try: - d = Device.open(dev_info) if dev_info.isDevice else Receiver.open(dev_info) + d = _device.Device.open(dev_info) if dev_info.isDevice else _receiver.Receiver.open(dev_info) if logger.isEnabledFor(logging.DEBUG): logger.debug('[%s] => %s', dev_info.path, d) if d is not None: diff --git a/lib/solaar/listener.py b/lib/solaar/listener.py index 94b39605f9..0e4c027c6a 100644 --- a/lib/solaar/listener.py +++ b/lib/solaar/listener.py @@ -24,8 +24,9 @@ from collections import namedtuple import gi +import logitech_receiver.device as _device +import logitech_receiver.receiver as _receiver -from logitech_receiver import Device, Receiver from logitech_receiver import base as _base from logitech_receiver import hidpp10 as _hidpp10 from logitech_receiver import listener as _listener @@ -302,9 +303,9 @@ def _start(device_info): assert _status_callback isDevice = device_info.isDevice if not isDevice: - receiver = Receiver.open(device_info) + receiver = _receiver.Receiver.open(device_info) else: - receiver = Device.open(device_info) + receiver = _device.Device.open(device_info) configuration.attach_to(receiver) if receiver: