mirror of
https://github.com/lutris/lutris
synced 2024-09-05 07:23:32 +00:00
Whoops, must use pop not del when the dict key might be missing already.
This commit is contained in:
parent
eb25d0df12
commit
8fcb6d71e3
|
@ -497,8 +497,8 @@ class Game(GObject.Object):
|
|||
self.config.save()
|
||||
|
||||
def reset_preferred_config():
|
||||
del game_config["preferred_launch_config_index"]
|
||||
del game_config["preferred_launch_config_name"]
|
||||
game_config.pop("preferred_launch_config_index", None)
|
||||
game_config.pop("preferred_launch_config_name", None)
|
||||
self.config.save()
|
||||
|
||||
if not configs:
|
||||
|
|
|
@ -184,8 +184,8 @@ class GameDialogCommon(ModelessDialog):
|
|||
|
||||
def on_reset_preferred_launch_config_clicked(self, _button, launch_config_box):
|
||||
game_config = self.game.config.game_level.get("game", {})
|
||||
del game_config["preferred_launch_config_name"]
|
||||
del game_config["preferred_launch_config_index"]
|
||||
game_config.pop("preferred_launch_config_name", None)
|
||||
game_config.pop("preferred_launch_config_index", None)
|
||||
launch_config_box.hide()
|
||||
|
||||
def _get_runner_box(self):
|
||||
|
|
Loading…
Reference in a new issue