2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Fix bad error message on {} in nodeshell/noderun

{} used in awk is likely, give proper error message.
This commit is contained in:
Jarrod Johnson 2018-05-22 09:56:53 -04:00
parent ca7711b373
commit be3ecf60a5

View File

@ -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))