feat: skip games with no description.
This commit is contained in:
parent
f979c44a3b
commit
7aa439e783
1 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue