Fix external components not refreshing with default or high refresh time (#2122)

This commit is contained in:
Otto Winter 2021-08-04 17:33:17 +02:00 committed by GitHub
parent ceb0564ebf
commit 768c71830b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,7 @@ def _process_git_config(config: dict, refresh) -> str:
age = datetime.datetime.now() - datetime.datetime.fromtimestamp( age = datetime.datetime.now() - datetime.datetime.fromtimestamp(
file_timestamp.stat().st_mtime file_timestamp.stat().st_mtime
) )
if age.seconds > refresh.total_seconds: if age.total_seconds() > refresh.total_seconds:
_LOGGER.info("Updating %s", key) _LOGGER.info("Updating %s", key)
_LOGGER.debug("Location: %s", repo_dir) _LOGGER.debug("Location: %s", repo_dir)
# Stash local changes (if any) # Stash local changes (if any)