From 0b0c1581ef5a30ad69d43c3103561de1a3a7ac32 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 27 Jan 2021 12:16:58 -0800 Subject: sim pipeline: improve exception catching --- fatcat_scholar/sim_pipeline.py | 9 +++++---- 1 file 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: -- cgit v1.2.3