Skip to content

Commit

Permalink
fix exception too broder
Browse files Browse the repository at this point in the history
  • Loading branch information
petretiandrea committed Dec 30, 2022
1 parent b444632 commit 3b096ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/tapo/common_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async def _async_update_data(self):
async def _update_with_fallback(self, retry=True):
try:
return await self.api.get_state()
except Exception:
except Exception: # pylint: disable=broad-except
if retry:
await self.api.login()
return await self._update_with_fallback(False)
2 changes: 1 addition & 1 deletion custom_components/tapo/sensors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ def get_value(self, state: TapoDeviceState | None) -> StateType:
if state is not None:
return state.rssi
return 0
except:
except Exception: # pylint: disable=broad-except
return 0

0 comments on commit 3b096ac

Please sign in to comment.