Revision 2029fe3f qa/qa_utils.py
b/qa/qa_utils.py | ||
---|---|---|
139 | 139 |
""" |
140 | 140 |
if isinstance(entity, basestring): |
141 | 141 |
result = entity |
142 |
elif isinstance(entity, dict): |
|
142 |
elif isinstance(entity, dict) or hasattr(entity, "__getitem__"):
|
|
143 | 143 |
result = entity[key] |
144 | 144 |
else: |
145 | 145 |
raise qa_error.Error("Expected string or dictionary, got %s: %s" % |
Also available in: Unified diff