don't crash on empty meta-ignore dicts

This commit is contained in:
Fabian Dill 2020-05-07 08:26:50 +02:00
parent d3224d1f0c
commit 4a5fe1333c
1 changed files with 5 additions and 4 deletions

View File

@ -141,9 +141,10 @@ def main():
if option is not None:
for player, path in player_path_cache.items():
players_meta = weights_cache[path]["meta_ignore"]
if players_meta:
if key not in players_meta:
weights_cache[path][key] = option
elif type(players_meta) == dict and option not in players_meta[key]:
elif type(players_meta) == dict and players_meta[key] and option not in players_meta[key]:
weights_cache[path][key] = option
for player in range(1, args.multi + 1):