mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Refactor try catch in hassio.issues per feedback (#93872)
This commit is contained in:
parent
47a2d5b472
commit
e272e3c721
@ -274,12 +274,13 @@ class SupervisorIssues:
|
|||||||
data["suggestions"] = (
|
data["suggestions"] = (
|
||||||
await self._client.get_suggestions_for_issue(data["uuid"])
|
await self._client.get_suggestions_for_issue(data["uuid"])
|
||||||
)[ATTR_SUGGESTIONS]
|
)[ATTR_SUGGESTIONS]
|
||||||
self.add_issue(Issue.from_dict(data))
|
|
||||||
except HassioAPIError:
|
except HassioAPIError:
|
||||||
_LOGGER.error(
|
_LOGGER.error(
|
||||||
"Could not get suggestions for supervisor issue %s, skipping it",
|
"Could not get suggestions for supervisor issue %s, skipping it",
|
||||||
data["uuid"],
|
data["uuid"],
|
||||||
)
|
)
|
||||||
|
return
|
||||||
|
self.add_issue(Issue.from_dict(data))
|
||||||
|
|
||||||
def remove_issue(self, issue: Issue) -> None:
|
def remove_issue(self, issue: Issue) -> None:
|
||||||
"""Remove an issue from the list. Delete a repair if necessary."""
|
"""Remove an issue from the list. Delete a repair if necessary."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user