aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-01-27 12:16:58 -0800
committerBryan Newbold <bnewbold@archive.org>2021-01-27 12:16:58 -0800
commit0b0c1581ef5a30ad69d43c3103561de1a3a7ac32 (patch)
tree5ea9d6fe87b9e4ef0ea9a0fa98c478552b2a1111
parentc556ab44d3f518a23aeb7bf69437fc3b49fcfc65 (diff)
downloadfatcat-scholar-0b0c1581ef5a30ad69d43c3103561de1a3a7ac32.tar.gz
fatcat-scholar-0b0c1581ef5a30ad69d43c3103561de1a3a7ac32.zip
sim pipeline: improve exception catching
-rw-r--r--fatcat_scholar/sim_pipeline.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/fatcat_scholar/sim_pipeline.py b/fatcat_scholar/sim_pipeline.py
index 0277619..621f1fc 100644
--- a/fatcat_scholar/sim_pipeline.py
+++ b/fatcat_scholar/sim_pipeline.py
@@ -155,10 +155,11 @@ class SimPipeline:
full_issue = self.fetch_sim_issue(
row["issue_item"], row["pub_collection"]
)
- except requests.exceptions.ConnectionError as e:
- print(str(e), file=sys.stderr)
- continue
- except requests.exceptions.ReadTimeout as e:
+ except (
+ requests.exceptions.ConnectionError,
+ requests.exceptions.Timeout,
+ requests.exceptions.RetryError,
+ ) as e:
print(str(e), file=sys.stderr)
continue
if not full_issue: