Fix old custom configs where never deleted

This commit is contained in:
TheophileDiot 2022-09-29 18:14:28 +02:00
parent 803ff8cb56
commit 57ad9d7ee0
1 changed files with 7 additions and 7 deletions

View File

@ -143,6 +143,13 @@ class Config(ApiCaller, ConfigCaller) :
# stop scheduler just in case caller didn't do it
self.stop_scheduler()
# remove old autoconf configs if it exists
if self.__configs:
ret = self.__remove_configs()
if not ret :
success = False
log("CONFIG", "", "removing custom configs failed, configuration will not work as expected...")
# update values
self.__instances = instances
@ -209,13 +216,6 @@ class Config(ApiCaller, ConfigCaller) :
success = False
log("CONFIG", "", "reload failed, configuration will not work as expected...")
# remove autoconf configs
if configs == None :
ret = self.__remove_configs()
if not ret :
success = False
log("CONFIG", "", "removing custom configs failed, configuration will not work as expected...")
return success
def start_scheduler(self) :