From d7ee37e6db6317f412c9dc5e7fa7604c044b13e2 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 11 Nov 2022 00:41:18 -0800 Subject: [PATCH] fix bug in parser when concatenating stuff that isn't variables --- src/openpower/decoder/pseudo/parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openpower/decoder/pseudo/parser.py b/src/openpower/decoder/pseudo/parser.py index 1e6a330f..42df81be 100644 --- a/src/openpower/decoder/pseudo/parser.py +++ b/src/openpower/decoder/pseudo/parser.py @@ -170,8 +170,9 @@ def check_concat(node): # checks if the comparison is already a concat print("check concat", node) if not isinstance(node, ast.Call): return [node] - print("func", node.func.id) - if node.func.id != 'concat': + node_func_id = getattr(node.func, "id", None) + print("func", node_func_id) + if node_func_id != 'concat': return [node] if node.keywords: # a repeated list-constant, don't optimise return [node] -- 2.30.2