From 55136ba6d185648a3510edd52b3a2ef6b015b2fb Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Fri, 2 Jun 2023 15:27:30 +0200 Subject: [PATCH] kconfig: fix incompatibility with python < 3.9 Signed-off-by: Andrea Righi --- kconfig/annotations.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kconfig/annotations.py b/kconfig/annotations.py index e20a087..1d5e40c 100644 --- a/kconfig/annotations.py +++ b/kconfig/annotations.py @@ -342,7 +342,11 @@ class Annotation(Config): # new notes that are different than the old ones. old_val = tmp_a.config.get(conf) if old_val and 'policy' in old_val: - if old_val['policy'] == old_val['policy'] | new_val['policy']: + try: + can_skip = old_val['policy'] == old_val['policy'] | new_val['policy'] + except TypeError: + can_skip = old_val['policy'] == {**old_val['policy'], **new_val['policy']} + if can_skip: if 'note' not in new_val: continue if 'note' in old_val and 'note' in new_val: -- 2.31.1