Fix an error handling case in instance info
authorIustin Pop <iustin@google.com>
Mon, 12 Jan 2009 10:27:02 +0000 (10:27 +0000)
committerIustin Pop <iustin@google.com>
Mon, 12 Jan 2009 10:27:02 +0000 (10:27 +0000)
The checking for invalid instance names in LUQueryInstanceData is broken
since commit 1642.

Reviewed-by: imsnah

lib/cmdlib.py

index 82bbdf9..6c74eed 100644 (file)
@@ -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: