From 78d255ee566c9a341c5ce21ce58685c5313bf926 Mon Sep 17 00:00:00 2001 From: Paul Pfeister Date: Tue, 7 May 2024 22:32:49 -0400 Subject: [PATCH] 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). --- sherlock/resources/data.json | 1 - sherlock/sites.py | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sherlock/resources/data.json b/sherlock/resources/data.json index 25aab4902..d7d5dab08 100644 --- a/sherlock/resources/data.json +++ b/sherlock/resources/data.json @@ -1,5 +1,4 @@ { - "$schema": "data.schema.json", "1337x": { "errorMsg": [ "Error something went wrong.", diff --git a/sherlock/sites.py b/sherlock/sites.py index 009a05c12..ba6c930a9 100644 --- a/sherlock/sites.py +++ b/sherlock/sites.py @@ -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