From 1a2bfd90ce5c33c05d95dfae5b6af481f1090e3d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 12 Feb 2022 16:00:45 +0000 Subject: [PATCH] Tidying --- newswire.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/newswire.py b/newswire.py index 0546bc31d..c19b8908c 100644 --- a/newswire.py +++ b/newswire.py @@ -508,12 +508,12 @@ def xml_podcast_to_dict(xml_item: str, xml_str: str) -> {}: if pod_text: pod_entry['text'] = pod_text + appended = False if pod_key + 's' in podcast_properties: if isinstance(podcast_properties[pod_key + 's'], list): podcast_properties[pod_key + 's'].append(pod_entry) - else: - podcast_properties[pod_key] = pod_entry - else: + appended = True + if not appended: podcast_properties[pod_key] = pod_entry ctr += 1