Roll HACS to 1.31.0

This commit is contained in:
root
2023-03-04 12:15:50 -08:00
parent 39fb3ccd1d
commit 8056390e49
8 changed files with 86 additions and 32 deletions

View File

@@ -74,7 +74,9 @@ class Backup:
self.local_path,
self.backup_path_full,
)
except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except
except (
BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except
) as exception:
self.hacs.log.warning("Could not create backup: %s", exception)
def restore(self) -> None:

View File

@@ -241,7 +241,9 @@ class HacsData:
self.async_restore_repository(entry, repo_data)
self.logger.info("<HacsData restore> Restore done")
except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except
except (
BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except
) as exception:
self.logger.critical(
"<HacsData restore> [%s] Restore Failed!", exception, exc_info=exception
)
@@ -282,6 +284,8 @@ class HacsData:
repository.data.description = repository_data.get("description", "")
repository.data.downloads = repository_data.get("downloads", 0)
repository.data.last_updated = repository_data.get("last_updated", 0)
if self.hacs.system.generator:
repository.data.etag_releases = repository_data.get("etag_releases")
repository.data.etag_repository = repository_data.get("etag_repository")
repository.data.topics = [
topic for topic in repository_data.get("topics", []) if topic not in TOPIC_FILTER

View File

@@ -17,7 +17,9 @@ class HACSStore(Store):
"""Load the data from disk if version matches."""
try:
data = json_util.load_json(self.path)
except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except
except (
BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except
) as exception:
_LOGGER.critical(
"Could not load '%s', restore it from a backup or delete the file: %s",
self.path,

View File

@@ -31,6 +31,8 @@ def render_template(hacs: HacsBase, content: str, context: HacsRepository) -> st
version_available=context.releases.last_release,
version_installed=context.display_installed_version,
)
except BaseException as exception: # lgtm [py/catch-base-exception] pylint: disable=broad-except
except (
BaseException # lgtm [py/catch-base-exception] pylint: disable=broad-except
) as exception:
context.logger.debug(exception)
return content