From 8dc3e5d7064fc3b3c5d93fabc3fdb03e70cf2e75 Mon Sep 17 00:00:00 2001 From: Anderson Shindy Oki Date: Wed, 4 Dec 2024 09:46:03 +0900 Subject: [PATCH] no log: Fix python deprecated syntax on anidb refiner --- bazarr/subtitles/refiners/anidb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazarr/subtitles/refiners/anidb.py b/bazarr/subtitles/refiners/anidb.py index ba8d6bcf0..93b00bf82 100644 --- a/bazarr/subtitles/refiners/anidb.py +++ b/bazarr/subtitles/refiners/anidb.py @@ -111,7 +111,7 @@ class AniDBClient(object): mapping_list = anime.find('mapping-list') # Handle mapping list for Specials - if mapping_list: + if mapping_list is not None: for mapping in mapping_list.findall("mapping"): if mapping.text is None: continue @@ -176,7 +176,7 @@ class AniDBClient(object): episode_elements = xml_root.find('episodes') - if not episode_elements: + if episode_elements is None: raise ValueError return etree.tostring(episode_elements, encoding='utf8', method='xml')