From: Christian Eiden Date: Tue, 3 Nov 2020 09:12:20 +0000 (+0100) Subject: in python 3, dict.has_key() has been removed X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=febcf9818d7c37fec8a98d424934edcb3243d5e4;p=thirdparty%2Ftvheadend.git in python 3, dict.has_key() has been removed Ased in operator instead. Also, added check for empty string. Signed-off-by: Christian Eiden --- diff --git a/support/tvhmeta b/support/tvhmeta index 31b3f1aa4..89e22e580 100755 --- a/support/tvhmeta +++ b/support/tvhmeta @@ -233,7 +233,7 @@ class TvhMeta(object): if title_tuple is None: raise RuntimeError("Record has no title: " + data) - if not force_refresh and rec.has_key("image") and rec.has_key("fanart_image") and rec["image"] is not None and rec["fanart_image"] is not None: + if not force_refresh and "image" in rec and "fanart_image" in rec and rec["image"] is not None and rec["image"] != "" and rec["fanart_image"] is not None and rec["fanart_image"] != "": logging.info("We have both image and fanart_image already for %s so nothing to do (%s)", uuid, recjson) return