Skip to content

Commit

Permalink
Fix parser regression
Browse files Browse the repository at this point in the history
Added exception catch for TypeErrors due to future addition of keys, allowing Sherlock to continue past those errors.
Removed $schema to accomodate older versions of the parser. This key will be added back in sherlock-project#2088 (or other version incrementing change).
  • Loading branch information
ppfeister committed May 8, 2024
1 parent d0c8282 commit 78d255e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion sherlock/resources/data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"$schema": "data.schema.json",
"1337x": {
"errorMsg": [
"<title>Error something went wrong.</title>",
Expand Down
2 changes: 2 additions & 0 deletions sherlock/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ def __init__(self, data_file_path=None):
raise ValueError(
f"Problem parsing json contents at '{data_file_path}': Missing attribute {error}."
)
except TypeError as error:
print(f"Encountered TypeError parsing json contents for target '{site_name}' at {data_file_path}\nSkipping target.\n")

return

Expand Down

0 comments on commit 78d255e

Please sign in to comment.