From e06cc1d4fc34ba07f64128733096b7806754984d Mon Sep 17 00:00:00 2001 From: BlueFox Date: Sat, 17 May 2025 15:08:48 +0200 Subject: [PATCH] Fixed bug when saved selected file (in the config.ini) has been deleted before program start --- tasmotonov-gui.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasmotonov-gui.py b/tasmotonov-gui.py index 3a7b74d..e93a84c 100755 --- a/tasmotonov-gui.py +++ b/tasmotonov-gui.py @@ -37,7 +37,10 @@ def load_config(file="config.ini"): # load config from configparser.ConfigParse if "file" in to_load['DEFAULT']: filename = to_load['DEFAULT']['file'] if filename != "": - tab1_load_file() + try: + tab1_load_file() + except FileNotFoundError: + tab1_clear() if "inline" in to_load['DEFAULT']: window.tab2_plainTextEdit.setPlainText(to_load['DEFAULT']['inline']) if "action" in to_load['DEFAULT']: