diff options
author | Bryan Newbold <bnewbold@archive.org> | 2021-01-27 12:16:58 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2021-01-27 12:16:58 -0800 |
commit | 0b0c1581ef5a30ad69d43c3103561de1a3a7ac32 (patch) | |
tree | 5ea9d6fe87b9e4ef0ea9a0fa98c478552b2a1111 /fatcat_scholar | |
parent | c556ab44d3f518a23aeb7bf69437fc3b49fcfc65 (diff) | |
download | fatcat-scholar-0b0c1581ef5a30ad69d43c3103561de1a3a7ac32.tar.gz fatcat-scholar-0b0c1581ef5a30ad69d43c3103561de1a3a7ac32.zip |
sim pipeline: improve exception catching
Diffstat (limited to 'fatcat_scholar')
-rw-r--r-- | fatcat_scholar/sim_pipeline.py | 9 |
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: |