From bd52f08a30626fa06e5dc14a3a5a76ea95e67910 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 2 Oct 2022 15:05:07 +0200 Subject: [PATCH] Fix for #2547 (None isn't iterable, so in case scholary request fails, empty list has to be returned) --- cps/metadata_provider/scholar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/metadata_provider/scholar.py b/cps/metadata_provider/scholar.py index 498184ec..5f632343 100644 --- a/cps/metadata_provider/scholar.py +++ b/cps/metadata_provider/scholar.py @@ -54,7 +54,7 @@ class scholar(Metadata): 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