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:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user