From 578ce63bd17df11d3ca7cd1083feebe4b92e457c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 23 Jul 2020 15:31:03 -0700 Subject: simple lint (flake8) fixes over python codebase These should not have any behavior changes, though a number of exception catches are now more general, and there may be long-tail exceptions getting thrown in these statements. --- python/fatcat_tools/importers/grobid_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/fatcat_tools/importers/grobid_metadata.py') diff --git a/python/fatcat_tools/importers/grobid_metadata.py b/python/fatcat_tools/importers/grobid_metadata.py index 5ec6cc3c..a811c856 100644 --- a/python/fatcat_tools/importers/grobid_metadata.py +++ b/python/fatcat_tools/importers/grobid_metadata.py @@ -104,7 +104,7 @@ class GrobidMetadataImporter(EntityImporter): if raw.get('date'): try: year = int(raw['date'].strip()[:4]) - except: + except (IndexError, ValueError): pass for key in ('volume', 'url', 'issue', 'publisher'): if raw.get(key): -- cgit v1.2.3