From: Philipp Spitzer Date: Fri, 10 Dec 2021 20:37:22 +0000 (+0100) Subject: Fix check for existence of image. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/d29da7b8f840b53ec8c5121326563c7e20c3e69e Fix check for existence of image. --- diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index 8771f0c..b7ba7a7 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -90,7 +90,7 @@ class SledrunWikiTextToJsonBot( v = rbb['Bild'] if v is not None: image_page = Page(self.site, v, ns=BuiltinNamespace.FILE) - if image_page.exists(): + if not image_page.exists(): warning(f"{image_page.title()} does not exist.") sledrun_json['image'] = v