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):
|
async def _read_line(self):
|
||||||
try:
|
try:
|
||||||
return await super()._read_line()
|
return await super()._read_line()
|
||||||
except (Exception, TimeoutError, asyncio.exceptions.TimeoutError):
|
except (
|
||||||
|
TimeoutError,
|
||||||
|
asyncio.TimeoutError, # Remove in Python 3.11
|
||||||
|
):
|
||||||
self.connection_error.emit()
|
self.connection_error.emit()
|
||||||
|
|
||||||
|
|
||||||
@ -43,9 +46,8 @@ class Thermostat(QObject, metaclass=PropertyMeta):
|
|||||||
try:
|
try:
|
||||||
raise self.task.exception()
|
raise self.task.exception()
|
||||||
except (
|
except (
|
||||||
Exception,
|
|
||||||
TimeoutError,
|
TimeoutError,
|
||||||
asyncio.exceptions.TimeoutError,
|
asyncio.TimeoutError, # Remove in Python 3.11
|
||||||
):
|
):
|
||||||
logging.error(
|
logging.error(
|
||||||
"Encountered an error while updating parameter tree.",
|
"Encountered an error while updating parameter tree.",
|
||||||
|
Loading…
Reference in New Issue
Block a user