From 515207afc8052cd4bbf261e20ac691312e6b222a Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Sat, 16 Feb 2008 13:06:37 +0000
Subject: [PATCH] Fix gnt-instance info i1 i2 ...

Due to an indentation error only the last instance queried got returned by
LUQueryInstanceData. Moving the append() call inside the for cycle to fix this
issue.

This is a one-liner targeted at 1.2.3

Reviewed-by: iustinp
---
 lib/cmdlib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 4bb16f32a..11c98bc87 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4028,7 +4028,7 @@ class LUQueryInstanceData(NoHooksLU):
         instance = self.cfg.GetInstanceInfo(self.cfg.ExpandInstanceName(name))
         if instance is None:
           raise errors.OpPrereqError("No such instance name '%s'" % name)
-      self.wanted_instances.append(instance)
+        self.wanted_instances.append(instance)
     else:
       self.wanted_instances = [self.cfg.GetInstanceInfo(name) for name
                                in self.cfg.GetInstanceList()]
-- 
GitLab