conflict with "get" method when props are resources
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
Won't Fix
|
High
|
Brian Curtin |
Bug Description
In the process of doing an attribute access on the id of a resource.prop that is an ID and has type=resource, because of our overloaded use of the "get" function, we end up trying to make a HTTP GET instead of dictionary get.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/
return self._call(
File "/Users/
{"image_id": self._get_
File "/Users/
return value.id
File "/Users/
return self._attrs.
File "/Users/
include_
File "/Users/
response = session.get(url, service=
AttributeError: 'str' object has no attribute 'get'
We should be more defensive, either checking if it's a resource or using subscript notation instead.
I saw this one too, but it seemed like it was my own fault. The thing is it is a really confusing error until you finally look up the stack trace.