From be3ecf60a5373479ced5590d2f844157a45e297d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 22 May 2018 09:56:53 -0400 Subject: [PATCH] Fix bad error message on {} in nodeshell/noderun {} used in awk is likely, give proper error message. --- .../confluent/plugins/configuration/attributes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/plugins/configuration/attributes.py b/confluent_server/confluent/plugins/configuration/attributes.py index 2e7ddf98..ccbaab97 100644 --- a/confluent_server/confluent/plugins/configuration/attributes.py +++ b/confluent_server/confluent/plugins/configuration/attributes.py @@ -183,8 +183,10 @@ def _expand_expression(nodes, configmanager, inputdata): pernodeexpressions[expanded[0]] = expanded[1] for node in util.natural_sort(pernodeexpressions): yield msg.KeyValueData({'value': pernodeexpressions[node]}, node) - except ValueError as e: - raise exc.InvalidArgumentException(str(e)) + except (SyntaxError, ValueError) as e: + raise exc.InvalidArgumentException( + 'Bad confluent expression syntax (must use "{{" and "}}" if not ' + 'desiring confluent exparnsion): ' + str(e))