X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/cf26a87a6f249091d1b4e39d90b027e0ab688d45..5627f3753b4793a77be266d75a3aa9dcf0d3feab:/lib/cmdlib.py?ds=sidebyside diff --git a/lib/cmdlib.py b/lib/cmdlib.py index dd68d89..afffbfb 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -428,7 +428,7 @@ def _GetWantedNodes(lu, nodes): @param nodes: list of node names or None for all nodes @rtype: list @return: the list of nodes, sorted - @raise errors.OpProgrammerError: if the nodes parameter is wrong type + @raise errors.ProgrammerError: if the nodes parameter is wrong type """ if not isinstance(nodes, list): @@ -439,11 +439,7 @@ def _GetWantedNodes(lu, nodes): raise errors.ProgrammerError("_GetWantedNodes should only be called with a" " non-empty list of nodes whose name is to be expanded.") - wanted = [] - for name in nodes: - node = _ExpandNodeName(lu.cfg, name) - wanted.append(node) - + wanted = [_ExpandNodeName(lu.cfg, name) for name in nodes] return utils.NiceSort(wanted)