From 1c9ee91b788cc4446ffcadecc939b3af759ec02a Mon Sep 17 00:00:00 2001 From: aronwk-aaron Date: Fri, 10 Nov 2023 00:09:07 -0600 Subject: [PATCH] check for null --- app/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/commands.py b/app/commands.py index ce0b292..34f03b1 100644 --- a/app/commands.py +++ b/app/commands.py @@ -188,7 +188,8 @@ def remove_buffs(): for char in chars: character_xml = ET.XML(char.xml_data.replace("\"stt=", "\" stt=")) dest = character_xml.find(".//buff...") - dest.remove(character_xml.find(".//buff")) + if dest: + dest.remove(character_xml.find(".//buff")) char.save()