From e43c6047bed3006154f1a82910975240d589bc58 Mon Sep 17 00:00:00 2001 From: Paul Pfeister Date: Thu, 11 Apr 2024 17:39:23 -0400 Subject: [PATCH] Fix status_code default logic bug --- sherlock/sherlock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sherlock/sherlock.py b/sherlock/sherlock.py index 6045918..b3d7216 100644 --- a/sherlock/sherlock.py +++ b/sherlock/sherlock.py @@ -413,7 +413,7 @@ def sherlock( if isinstance(error_codes, int): error_codes = [error_codes] - if r.status_code in error_codes: + if error_codes is not None and r.status_code in error_codes: query_status = QueryStatus.AVAILABLE elif r.status_code >= 300 or r.status_code < 200: query_status = QueryStatus.AVAILABLE