[kemonoparty] fix KeyError for empty files (#5368)

This commit is contained in:
Mike Fährmann
2024-03-24 02:21:38 +01:00
parent c3bafd6a2b
commit 15a4bc2584
3 changed files with 12 additions and 2 deletions

View File

@@ -156,7 +156,7 @@ class KemonopartyExtractor(Extractor):
def _file(self, post):
file = post["file"]
if not file:
if not file or "path" not in file:
return ()
file["type"] = "file"
return (file,)

View File

@@ -6,4 +6,4 @@
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
__version__ = "1.26.9"
__version__ = "1.27.0-dev"