1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-26 01:50:31 +00:00

Fix for #2547 (None isn't iterable, so in case scholary request fails, empty list has to be returned)

This commit is contained in:
Ozzie Isaacs 2022-10-02 15:05:07 +02:00
parent edc9703716
commit bd52f08a30

View File

@ -54,7 +54,7 @@ class scholar(Metadata):
scholar_gen = itertools.islice(scholarly.search_pubs(query), 10) scholar_gen = itertools.islice(scholarly.search_pubs(query), 10)
except Exception as e: except Exception as e:
log.warning(e) log.warning(e)
return None return list()
for result in scholar_gen: for result in scholar_gen:
match = self._parse_search_result( match = self._parse_search_result(
result=result, generic_cover="", locale=locale result=result, generic_cover="", locale=locale