Skip to content

Commit 2d3426c

Browse files
authored
fix: use current world infos to compute worlds to remove (#315)
When computing worlds to remove, we need to look into current world infos, not the new ones. Previous code would raise key error since we were trying to find a world name that was not present in new world infos data structure.
1 parent dcc104d commit 2d3426c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

infscale/execution/config_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_worlds_to_add_and_remove(self) -> tuple[list[WorldInfo], list[WorldInfo]
8585
cur = self._world_infos.keys()
8686

8787
worlds_to_add = [new_world_infos[name] for name in new - cur]
88-
worlds_to_remove = [new_world_infos[name] for name in cur - new]
88+
worlds_to_remove = [self._world_infos[name] for name in cur - new]
8989

9090
return worlds_to_add, worlds_to_remove
9191

0 commit comments

Comments
 (0)