From 7f36ebd8fd301536775df1ebdce5caecb8ef757b Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Mon, 5 Dec 2022 07:28:49 +0100 Subject: [PATCH] annotations: properly merge configs with includes Signed-off-by: Andrea Righi --- kconfig/annotations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kconfig/annotations.py b/kconfig/annotations.py index 7645fd1..0225e9d 100644 --- a/kconfig/annotations.py +++ b/kconfig/annotations.py @@ -103,10 +103,10 @@ class Annotation(Config): if conf in config: entry = config[conf] else: - entry = {} + entry = {'policy': {}} m = re.match(r'.*policy<(.*)>', line) if m: - entry['policy'] = literal_eval(m.group(1)) + entry['policy'] |= literal_eval(m.group(1)) m = re.match(r'.*note<(.*?)>', line) if m: entry['note'] = "'" + m.group(1).replace("'", '') + "'" -- 2.31.1