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