From c563731e864f5af2c5ffd1e387db8551a76cd5ae Mon Sep 17 00:00:00 2001 From: bunkerity Date: Wed, 22 Jun 2022 09:34:18 +0200 Subject: [PATCH] autoconf - fix overwrite configs file when using Docker autoconf --- autoconf/Config.py | 9 +++++---- autoconf/DockerController.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/autoconf/Config.py b/autoconf/Config.py index ec861b5..27d4475 100644 --- a/autoconf/Config.py +++ b/autoconf/Config.py @@ -131,10 +131,11 @@ class Config(ApiCaller, ConfigCaller) : self._set_apis(self.__get_apis()) # write configs - ret = self.__write_configs() - if not ret : - success = False - log("CONFIG", "❌", "saving custom configs failed, configuration will not work as expected...") + if configs != None : + ret = self.__write_configs() + if not ret : + success = False + log("CONFIG", "❌", "saving custom configs failed, configuration will not work as expected...") # get env env = self.__get_full_env() diff --git a/autoconf/DockerController.py b/autoconf/DockerController.py index 8b72b09..ea1d240 100644 --- a/autoconf/DockerController.py +++ b/autoconf/DockerController.py @@ -43,7 +43,7 @@ class DockerController(Controller) : raise("get_configs is not supported with DockerController") def apply_config(self) : - return self._config.apply(self._instances, self._services, configs=self._configs) + return self._config.apply(self._instances, self._services) def process_events(self) : for event in self.__client.events(decode=True, filters={"type": "container"}) :