forked from M-Labs/thermostat
Remove exception too general
This commit is contained in:
parent
0791f0df4b
commit
d29fae0476
@ -12,7 +12,10 @@ class WrappedClient(QObject, Client):
|
||||
async def _read_line(self):
|
||||
try:
|
||||
return await super()._read_line()
|
||||
except (Exception, TimeoutError, asyncio.exceptions.TimeoutError):
|
||||
except (
|
||||
TimeoutError,
|
||||
asyncio.TimeoutError, # Remove in Python 3.11
|
||||
):
|
||||
self.connection_error.emit()
|
||||
|
||||
|
||||
@ -43,9 +46,8 @@ class Thermostat(QObject, metaclass=PropertyMeta):
|
||||
try:
|
||||
raise self.task.exception()
|
||||
except (
|
||||
Exception,
|
||||
TimeoutError,
|
||||
asyncio.exceptions.TimeoutError,
|
||||
asyncio.TimeoutError, # Remove in Python 3.11
|
||||
):
|
||||
logging.error(
|
||||
"Encountered an error while updating parameter tree.",
|
||||
|
Loading…
Reference in New Issue
Block a user