summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-06-19 20:33:08 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-09-11 11:08:08 -0500
commit98314d5c7513b97495e9199baa0be39b6f43f17f (patch)
tree4b548d151191792dea4c3e109874a46b3916c5c2 /python/vyos
parent03fdc2302531efc4d99394739c5c11b8792ef46f (diff)
downloadvyos-1x-98314d5c7513b97495e9199baa0be39b6f43f17f.tar.gz
vyos-1x-98314d5c7513b97495e9199baa0be39b6f43f17f.zip
migration: T6447: fix missing check before reset to checkpoint
(cherry picked from commit 734db72b916192a3988f3b1e9f4bcc3be159cfe5)
Diffstat (limited to 'python/vyos')
-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):