summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-06-19 20:33:08 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-06-26 15:38:41 -0500
commit734db72b916192a3988f3b1e9f4bcc3be159cfe5 (patch)
tree05ca60218304d3e1fe6d6e15da82507e3f54a02a
parent1c59315e9d14a4160b6e744ded08312aa8c70d11 (diff)
downloadvyos-1x-734db72b916192a3988f3b1e9f4bcc3be159cfe5.tar.gz
vyos-1x-734db72b916192a3988f3b1e9f4bcc3be159cfe5.zip
migration: T6447: fix missing check before reset to checkpoint
-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):