config loading errors done
parent
d34b1f5b35
commit
a38e38f96e
9
main.py
9
main.py
|
@ -89,9 +89,8 @@ if os.path.isfile(config_file_path):
|
|||
config_file = open(config_file_path, "r")
|
||||
configuration = json.loads(config_file.read())
|
||||
config_file.close()
|
||||
except:
|
||||
#TODO: show an error message
|
||||
warn("Not implemented!")
|
||||
except Exception:
|
||||
error("An exception occurred while trying to load the configuration.", handle_gracefully=False)
|
||||
else:
|
||||
# config not found
|
||||
dialog_interaction_handler = Window_Interaction_Handler()
|
||||
|
@ -109,9 +108,11 @@ else:
|
|||
#TODO: store default configuration
|
||||
warn("Not implemented!")
|
||||
else:
|
||||
print("No config present and user chose not to create one. Exiting.")
|
||||
error("No config present and user chose not to create one. Exiting.", is_exception=False, handle_gracefully=True)
|
||||
# exit with success exit code anyway because this is not a program failure
|
||||
sys.exit(EXIT_SUCCESS)
|
||||
|
||||
|
||||
#window = tk.Tk()
|
||||
#frame = ttk.Frame(window, padding=10)
|
||||
#frame.grid()
|
||||
|
|
Reference in New Issue