From f57c76e4d6d2f7a8d4873d240dcfeef457ddb3a2 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 12 Jan 2009 10:27:02 +0000
Subject: [PATCH] Fix an error handling case in instance info

The checking for invalid instance names in LUQueryInstanceData is broken
since commit 1642.

Reviewed-by: imsnah
---
 lib/cmdlib.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 82bbdf958..6c74eed20 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4950,8 +4950,7 @@ class LUQueryInstanceData(NoHooksLU):
       for name in self.op.instances:
         full_name = self.cfg.ExpandInstanceName(name)
         if full_name is None:
-          raise errors.OpPrereqError("Instance '%s' not known" %
-                                     self.op.instance_name)
+          raise errors.OpPrereqError("Instance '%s' not known" % name)
         self.wanted_names.append(full_name)
       self.needed_locks[locking.LEVEL_INSTANCE] = self.wanted_names
     else:
-- 
GitLab