From 7aa439e783385d82d2045651e31dba48b8304a15 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sun, 21 Dec 2025 09:36:23 +0100 Subject: [PATCH] feat: skip games with no description. --- extract_romset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extract_romset.py b/extract_romset.py index eba5ee8..2a79663 100755 --- a/extract_romset.py +++ b/extract_romset.py @@ -17,5 +17,6 @@ for game in root.findall("game"): textFile = os.path.splitext(f"{romName}")[0] + ".txt" os.makedirs("text", exist_ok=True) - with open(f"text/{textFile}", "w", encoding="utf-8") as f: - f.write(game.find("description").text) + if game.find("description") is not None: + with open(f"text/{textFile}", "w", encoding="utf-8") as f: + f.write(game.find("description").text)