From: Andrea Righi Date: Fri, 2 Jun 2023 13:27:30 +0000 (+0200) Subject: kconfig: fix incompatibility with python < 3.9 X-Git-Tag: v0.1~18 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=55136ba6d185648a3510edd52b3a2ef6b015b2fb;p=annotations.git kconfig: fix incompatibility with python < 3.9 Signed-off-by: Andrea Righi --- 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: