KeyError happens when response body dosen't contain the key
Bug #1480741 reported by
Haiwei Xu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
Fix Committed
|
Undecided
|
Haiwei Xu |
Bug Description
Sometimes the exception returned from server does not contain a resource key, for example HTTPAccepted(202) just returns a notice, which should not be treated as an exception.
But in openstack/
708 @classmethod
709 def update_by_id(cls, session, resource_id, attrs, path_args=None):
710 """Update a remote resource with the given attributes.
......
748
749 if cls.resource_key:
750 resp = resp[cls.
751
752 return resp
Changed in python-openstacksdk: | |
assignee: | nobody → Haiwei Xu (xu-haiwei) |
To post a comment you must log in.
Fix committed in this patch https:/ /review. openstack. org/#/c/ 208265/