aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2019-07-31 21:56:45 -0700
committerBryan Newbold <bnewbold@archive.org>2019-07-31 21:56:45 -0700
commite58a5c98b3254f7d0e7a999edd7b1868edc87318 (patch)
tree2e3997639f5344c424a06a9e2d0a468908824d6d
parent46e975e852d6492362bfa15afd7419f68d10708d (diff)
downloadchocula-e58a5c98b3254f7d0e7a999edd7b1868edc87318.tar.gz
chocula-e58a5c98b3254f7d0e7a999edd7b1868edc87318.zip
don't return 'error' for bad CDX lookups
-rwxr-xr-xcheck_issn_urls.py4
1 files changed, 3 insertions, 1 deletions
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]