Skip to content

Commit

Permalink
Print an error on corrupted VDF
Browse files Browse the repository at this point in the history
  • Loading branch information
Matoking committed Jul 13, 2021
1 parent cd89dd1 commit 50d5511
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/protontricks/steam.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,10 @@ def _get_required_tool_appid(path):

tool_manifest = lower_dict(vdf.loads(tool_manifest_content))
return tool_manifest["manifest"].get("require_tool_appid", None)
except SyntaxError:
raise EnvironmentError(
"VDF file at {} is corrupted".format(tool_manifest_path)
)
except FileNotFoundError:
return None

Expand Down

0 comments on commit 50d5511

Please sign in to comment.