Skip to content

Commit

Permalink
catch JSONDecodeError
Browse files Browse the repository at this point in the history
  • Loading branch information
creatorcary committed Jul 3, 2024
1 parent 747f34a commit 934a586
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def name(self) -> str | None:
with open(SENTINEL_FILE_PATH, 'r') as file:
if contents := file.read():
return json.loads(contents).get('name')
except FileNotFoundError:
except (FileNotFoundError, json.JSONDecodeError):
return None

@api_method(UnvendorArgs, UnvendorResult, private=True)
Expand Down

0 comments on commit 934a586

Please sign in to comment.