From 58208e245e5fcfcbbda8d4a94ea7c66c6fedd1aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Barroso=20Galindo?= Date: Sat, 12 Nov 2022 15:50:43 +0100 Subject: [PATCH] Simplifying code a bit --- .github/update_distribution.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/update_distribution.sh b/.github/update_distribution.sh index 053493dcd..c480a4553 100755 --- a/.github/update_distribution.sh +++ b/.github/update_distribution.sh @@ -823,10 +823,7 @@ import xml.etree.ElementTree as ET try: context = ET.iterparse('${FILE}', events=('start',)) for _, elem in context: - elem_tag = elem.tag.lower() - if elem_tag == 'setname': - if elem.text is None: - continue + if elem.tag.lower() == 'setname' and elem.text is not None: print('echo %s' % elem.text.strip()) except ET.ParseError as e: pass