From 61dabca498baffbfbf7e5ab9fdf4f1456e700934 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Wed, 17 Feb 2010 17:42:48 +0100 Subject: [PATCH] Simplify a bit _GetWantedNodes This should have been done in the _ExpandNodeName patch. Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/cmdlib.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 10609001b..afffbfba8 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -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) -- GitLab