diff --git a/openfreebuds/driver/generic/spp.py b/openfreebuds/driver/generic/spp.py index cd3761d..5b766f1 100644 --- a/openfreebuds/driver/generic/spp.py +++ b/openfreebuds/driver/generic/spp.py @@ -33,7 +33,6 @@ async def start(self): sock.connect((self.device_address, self._spp_service_port)) reader, writer = await asyncio.open_connection(sock=sock) except (ConnectionResetError, ConnectionRefusedError, ConnectionAbortedError, OSError, ValueError): - log.exception("Driver startup failed") raise FbStartupError("Driver startup failed") self.__task_recv = asyncio.create_task(self._loop_recv(reader)) diff --git a/openfreebuds/driver/huawei/driver/generic.py b/openfreebuds/driver/huawei/driver/generic.py index 7dc56fc..12e2dd0 100644 --- a/openfreebuds/driver/huawei/driver/generic.py +++ b/openfreebuds/driver/huawei/driver/generic.py @@ -90,7 +90,7 @@ async def _handle_raw_pkg(self, pkg): pkg = HuaweiSppPackage.from_bytes(pkg) log.debug(f"RX {pkg}") except (AssertionError, OfbPackageChecksumError): - log.exception(f"Got non-parsable package {pkg.hex()}, ignoring") + log.info(f"Got non-parsable package {pkg.hex()}, ignoring") return if pkg.command_id in self.__pending_responses: @@ -159,7 +159,7 @@ async def init(self): async with asyncio.timeout(self.init_timeout): await self.on_init() break - except TimeoutError: + except (TimeoutError, ConnectionResetError): self.init_attempt += 1 except Exception: log.exception(f"Unknown error on {self.handler_id} init") diff --git a/openfreebuds/shortcuts.py b/openfreebuds/shortcuts.py index 828d32b..df6ea17 100644 --- a/openfreebuds/shortcuts.py +++ b/openfreebuds/shortcuts.py @@ -50,7 +50,6 @@ async def execute(self, shortcut, *args, no_catch: bool = False): return await handler(*args) except Exception as e: - log.exception(f"While triggering shortcut {shortcut}") if no_catch: raise e