INNER CODE UNIT · Python
check_for_new_version
stanfrbd/cyberbro · app.py:201
def check_for_new_version(current_version: str) -> bool:
"""Check if a new version of the application is available."""
if get_config().disable_version_check:
return False
cache_file: Path = DATA_DIR / "version_cache.json"
# Check if cache file exists and is not older than a day
try:
latest_version: str = get_latest_version_from_cache_file(cache_file)
except InvalidCachefileError:
latest_version: str = get_latest_version_from_updated_cache_file(cache_file)
return latest_version != current_version
@app.route("/")