solaar/cli: Remove outdated logger enabled checks

Logger enabled checks clutter the code unnecessarily. The checks are
now handled in a custom logger class. Eventually they can be completely
removed in the future.

Related #2664
This commit is contained in:
MattHag 2025-01-02 14:16:25 +01:00 committed by Peter F. Patel-Schneider
parent e9a58fb3e0
commit 636f736765
1 changed files with 2 additions and 4 deletions

View File

@ -116,8 +116,7 @@ def _receivers(dev_path=None):
continue continue
try: try:
r = receiver.create_receiver(base, dev_info) r = receiver.create_receiver(base, dev_info)
if logger.isEnabledFor(logging.DEBUG): logger.debug("[%s] => %s", dev_info.path, r)
logger.debug("[%s] => %s", dev_info.path, r)
if r: if r:
yield r yield r
except Exception as e: except Exception as e:
@ -135,8 +134,7 @@ def _receivers_and_devices(dev_path=None):
else: else:
d = receiver.create_receiver(base, dev_info) d = receiver.create_receiver(base, dev_info)
if logger.isEnabledFor(logging.DEBUG): logger.debug("[%s] => %s", dev_info.path, d)
logger.debug("[%s] => %s", dev_info.path, d)
if d is not None: if d is not None:
yield d yield d
except Exception as e: except Exception as e: