Fix parser regression
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/sherlock#2088 (or other version incrementing change).
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"$schema": "data.schema.json",
|
||||
"1337x": {
|
||||
"errorMsg": [
|
||||
"<title>Error something went wrong.</title>",
|
||||
|
||||
@@ -177,6 +177,8 @@ class SitesInformation:
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user