From 27f1d4d17d4313b113e9de4317d02a0d67653af3 Mon Sep 17 00:00:00 2001 From: Gil Bregman Date: Sun, 1 Sep 2024 15:03:15 +0300 Subject: [PATCH] Avoid an exception when running state test. Fixes #842 Signed-off-by: Gil Bregman --- control/state.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/control/state.py b/control/state.py index 57aab63a..90bc4659 100644 --- a/control/state.py +++ b/control/state.py @@ -786,8 +786,9 @@ def update(self) -> bool: # Handle namespace changes in which only the load balancing group id was changed only_lb_group_changed = [] + ns_prefix = GatewayState.build_namespace_key("nqn", None) for key in changed.keys(): - if not key.startswith(GatewayState.NAMESPACE_PREFIX): + if not key.startswith(ns_prefix): continue try: (should_process, new_lb_grp_id) = self.namespace_only_lb_group_id_changed(local_state_dict[key],