bugfix: app would start even with empty config params
This commit is contained in:
@@ -252,6 +252,8 @@ class Application:
|
||||
try:
|
||||
self.json_path = self.config.get("json", "path")
|
||||
self.csv_path = self.config.get("csv", "path")
|
||||
if self.json_path == "" or self.csv_path == "":
|
||||
raise ValueError("Empty JSON or CSV path")
|
||||
self.config_good = True
|
||||
except NoSectionError:
|
||||
self.show_config_error()
|
||||
@@ -259,6 +261,9 @@ class Application:
|
||||
except NoOptionError:
|
||||
self.show_config_error()
|
||||
self.show_settings()
|
||||
except ValueError:
|
||||
self.show_config_error()
|
||||
self.show_settings()
|
||||
|
||||
def show_config_error(self):
|
||||
show_error(message_title="Fehlerhafte Konfiguration",
|
||||
|
||||
Reference in New Issue
Block a user