no log: Fix python deprecated syntax on anidb refiner

pull/2786/head
Anderson Shindy Oki 1 month ago
parent dd8c7ad6fd
commit 8dc3e5d706

@ -111,7 +111,7 @@ class AniDBClient(object):
mapping_list = anime.find('mapping-list') mapping_list = anime.find('mapping-list')
# Handle mapping list for Specials # Handle mapping list for Specials
if mapping_list: if mapping_list is not None:
for mapping in mapping_list.findall("mapping"): for mapping in mapping_list.findall("mapping"):
if mapping.text is None: if mapping.text is None:
continue continue
@ -176,7 +176,7 @@ class AniDBClient(object):
episode_elements = xml_root.find('episodes') episode_elements = xml_root.find('episodes')
if not episode_elements: if episode_elements is None:
raise ValueError raise ValueError
return etree.tostring(episode_elements, encoding='utf8', method='xml') return etree.tostring(episode_elements, encoding='utf8', method='xml')

Loading…
Cancel
Save