From ec020877a258327dd7d85a2a0a72164f8150bcf8 Mon Sep 17 00:00:00 2001 From: Ailin Yu Date: Fri, 6 Dec 2024 11:56:54 -0800 Subject: [PATCH] chore: Unbound variable --- python/lib/sift_py/rule/service.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/lib/sift_py/rule/service.py b/python/lib/sift_py/rule/service.py index 69451296..951e4cc2 100644 --- a/python/lib/sift_py/rule/service.py +++ b/python/lib/sift_py/rule/service.py @@ -81,13 +81,12 @@ def load_rules_from_yaml( for namespace, rule_yamls in namespaced_rules.items(): for rule_yaml in rule_yamls: yaml_channel_references = rule_yaml.get("channel_references", []) + arg_channel_references = None if channel_references: for channel_map in channel_references: if channel_map.fully_qualified_rule_name == rule_yaml["name"]: arg_channel_references = channel_map.channel_references - else: - arg_channel_references = None if yaml_channel_references and arg_channel_references: raise ValueError(