From 98314d5c7513b97495e9199baa0be39b6f43f17f Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 19 Jun 2024 20:33:08 -0500 Subject: migration: T6447: fix missing check before reset to checkpoint (cherry picked from commit 734db72b916192a3988f3b1e9f4bcc3be159cfe5) --- python/vyos/compose_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- cgit v1.2.3