2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 18:42:29 +00:00

Provide specific error on empty noderanges for expressions

For commands such as nodeshell and noderun,
provide a more useful message when a noderange is empty.
This commit is contained in:
Jarrod Johnson
2025-04-29 16:13:33 -04:00
parent f797ede15f
commit 71f75dbc31

View File

@@ -209,6 +209,9 @@ def update_nodegroup(group, element, configmanager, inputdata):
def _expand_expression(nodes, configmanager, inputdata):
if not nodes:
raise exc.InvalidArgumentException(
'Specified noderange contains no nodes')
expression = inputdata.get_attributes(list(nodes)[0])
if type(expression) is dict:
expression = expression['expression']