summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/compose_config.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/vyos/compose_config.py b/python/vyos/compose_config.py
index 208c89dad..b1c277bce 100644
--- a/python/vyos/compose_config.py
+++ b/python/vyos/compose_config.py
@@ -55,7 +55,8 @@ class ComposeConfig:
try:
func(self.config_tree)
except Exception as e:
- self.config_tree = self.checkpoint
+ if self.checkpoint_file is not None:
+ self.config_tree = self.checkpoint
raise ComposeConfigError(e) from e
def apply_file(self, func_file: str, func_name: str):