Skip to content

Commit

Permalink
Fix for janeczku#2547 (None isn't iterable, so in case scholary reque…
Browse files Browse the repository at this point in the history
…st fails, empty list has to be returned)
  • Loading branch information
OzzieIsaacs committed Oct 2, 2022
1 parent edc9703 commit bd52f08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cps/metadata_provider/scholar.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def search(
scholar_gen = itertools.islice(scholarly.search_pubs(query), 10)
except Exception as e:
log.warning(e)
return None
return list()
for result in scholar_gen:
match = self._parse_search_result(
result=result, generic_cover="", locale=locale
Expand Down

0 comments on commit bd52f08

Please sign in to comment.