diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-06-03 23:18:19 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-06-03 23:18:19 -0700 |
commit | 5ef9d9c429d8215e2f29f5cd8edfceab0b9fb648 (patch) | |
tree | 5812e8d70ab86422db82e02351c56fcc8dfaae96 /fatcat_scholar | |
parent | 62fde540ef9c38d403ea89a6fb1db51bfba23da8 (diff) | |
download | fatcat-scholar-5ef9d9c429d8215e2f29f5cd8edfceab0b9fb648.tar.gz fatcat-scholar-5ef9d9c429d8215e2f29f5cd8edfceab0b9fb648.zip |
more flake8
Diffstat (limited to 'fatcat_scholar')
-rw-r--r-- | fatcat_scholar/djvu.py | 2 | ||||
-rw-r--r-- | fatcat_scholar/schema.py | 2 | ||||
-rw-r--r-- | fatcat_scholar/sim_pipeline.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/fatcat_scholar/djvu.py b/fatcat_scholar/djvu.py index c715608..3df61dd 100644 --- a/fatcat_scholar/djvu.py +++ b/fatcat_scholar/djvu.py @@ -29,7 +29,7 @@ def djvu_extract_leaf_texts( leaf_num = None try: leaf_num = int(usemap.replace(".djvu", "").split("_")[-1]) - except: + except Exception: continue if only_leaves is not None and leaf_num is not None: if leaf_num not in only_leaves: diff --git a/fatcat_scholar/schema.py b/fatcat_scholar/schema.py index 29bbe92..616857e 100644 --- a/fatcat_scholar/schema.py +++ b/fatcat_scholar/schema.py @@ -313,7 +313,7 @@ def es_biblio_from_release(release: ReleaseEntity) -> ScholarBiblio: issue_int=None, pages=release.pages, first_page=first_page, - first_page_int=None, + first_page_int=first_page_int, number=release.number, doi=release.ext_ids.doi, doi_prefix=release.ext_ids.doi and doi_split_prefix(release.ext_ids.doi), diff --git a/fatcat_scholar/sim_pipeline.py b/fatcat_scholar/sim_pipeline.py index cfc197f..3541bdc 100644 --- a/fatcat_scholar/sim_pipeline.py +++ b/fatcat_scholar/sim_pipeline.py @@ -85,7 +85,7 @@ class SimPipeline: # override 'close()' method so we can still read out contents djvu_bytes = io.BytesIO() djvu_bytes.close = lambda: None # type: ignore - assert issue_item_djvu.download(fileobj=djvu_bytes) == True + assert issue_item_djvu.download(fileobj=djvu_bytes) djvu_bytes.seek(0) djvu_xml = io.StringIO(djvu_bytes.read().decode("UTF-8")) del djvu_bytes |