From e58a5c98b3254f7d0e7a999edd7b1868edc87318 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 31 Jul 2019 21:56:45 -0700 Subject: don't return 'error' for bad CDX lookups --- check_issn_urls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check_issn_urls.py b/check_issn_urls.py index ff73353..c2a86ab 100755 --- a/check_issn_urls.py +++ b/check_issn_urls.py @@ -95,7 +95,9 @@ def check_gwb(url, match_type='exact'): time.sleep(5) if not resp.status_code == 200: sys.stderr.write("CDX ERR {}: {}\n".format(resp.status_code, url)) - return 'error' + # TODO: this isn't really correct, but not sure what to return/record + # if we failed through all timeouts + return None line = resp.text.strip().split('\n')[0] if line: dt = line.split()[1] -- cgit v1.2.3