Catch JSON decode errors when reading wine versions (Closes #3668)

This commit is contained in:
Mathieu Comandon 2021-09-06 14:09:23 -07:00
parent 4ed658727e
commit d31f636d6e

View file

@ -67,7 +67,7 @@ class DLLManager:
with open(self.versions_path, "r") as version_file:
try:
versions = [v["tag_name"] for v in json.load(version_file)]
except KeyError:
except (KeyError, json.decoder.JSONDecodeError):
logger.warning(
"Invalid versions file %s, deleting so it is downloaded on next start.",
self.versions_path