Commit 2029fe3f authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

QA: Support entity objects in qa_utils._GetName

This is a temporary solution until nodes and instances are converted to
objects with attributes.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarHelga Velroyen <>
parent cf62af3a
......@@ -139,7 +139,7 @@ def _GetName(entity, key):
if isinstance(entity, basestring):
result = entity
elif isinstance(entity, dict):
elif isinstance(entity, dict) or hasattr(entity, "__getitem__"):
result = entity[key]
raise qa_error.Error("Expected string or dictionary, got %s: %s" %
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