Commit f57c76e4 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix an error handling case in instance info

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

Reviewed-by: imsnah
parent afee0879
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment