mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 05:05:09 +02:00
Refactor try catch in hassio.issues per feedback (#93872)
This commit is contained in:
@@ -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."""
|
||||||
|
Reference in New Issue
Block a user