mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
chore: Fix error handling in Config.py when checking for changes and first config saved
This commit is contained in:
parent
39c97a0d67
commit
c4d8a308b1
1 changed files with 6 additions and 0 deletions
|
|
@ -80,9 +80,15 @@ class Config:
|
|||
i = 0
|
||||
while i < 60:
|
||||
curr_changes = self._db.check_changes()
|
||||
first_config_saved = self._db.is_first_config_saved()
|
||||
if isinstance(curr_changes, str):
|
||||
if not startup:
|
||||
self.__logger.error(f"An error occurred when checking for changes in the database : {curr_changes}")
|
||||
elif isinstance(first_config_saved, str):
|
||||
if not startup:
|
||||
self.__logger.error(f"An error occurred when checking if the first config is saved in the database : {first_config_saved}")
|
||||
elif not first_config_saved:
|
||||
self.__logger.warning("First configuration is not saved yet, retrying in 5 seconds ...")
|
||||
elif not any(curr_changes.values()):
|
||||
break
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue