diff --git a/data/tools/wesnoth/wmltools3.py b/data/tools/wesnoth/wmltools3.py index 13c13f75cb0c..aa460e440b36 100644 --- a/data/tools/wesnoth/wmltools3.py +++ b/data/tools/wesnoth/wmltools3.py @@ -27,11 +27,9 @@ def __repr__(self): def split_filenames(match): filename_group = match.group(1) - bracket = filename_group.find('[') - comma = filename_group.find(',') - if not comma: + if ',' not in filename_group: yield filename_group - elif not bracket: + elif '[' not in filename_group: yield from filename_group.split(',') else: bracket_depth = 0