catch config delete exception

This commit is contained in:
Semjon Kerner 2021-02-14 19:05:02 +01:00
parent 7f913dfc90
commit 693df9bf2d

View File

@ -53,8 +53,12 @@ class Config:
deletes a key from config deletes a key from config
:param key: key to delete :param key: key to delete
""" """
del self.config_dict[key] try:
self.save_config() del self.config_dict[key]
self.save_config()
except KeyError:
pass
def save_config(self): def save_config(self):
""" """