1
0
Fork 0
mirror of synced 2024-06-03 03:04:42 +12:00

Fix crash when no keys exists

This commit is contained in:
aznd 2022-03-21 22:40:02 +01:00
parent d3d269b16c
commit d528d82462

View file

@ -102,7 +102,10 @@ class EnvVars(QGroupBox, Ui_EnvVars):
value_item = self.env_vars_table.item(row, 1)
if key_item is not None and not key_item.text():
list_of_config_keys = list(self.core.lgd.config[f"{self.app_name}.env"].keys())
try:
list_of_config_keys = list(self.core.lgd.config[f"{self.app_name}.env"].keys())
except KeyError:
list_of_config_keys = []
try:
config_helper.remove_option(f"{self.app_name}.env", list_of_config_keys[row])
except IndexError: