documentation mislead on using post_options

Bug #1655966 reported by Jerome Raezweb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
New
Undecided
Unassigned

Bug Description

Hi,

 after tried to implement a simple post, I found some misleading examples in the documentation here:
 http://docs.openstack.org/developer/python-swiftclient/service-api.html#post

 you have "post_options = {"header": "X-Delete-After:86400"}"

 but if you look at the code here:
 https://github.com/openstack/python-swiftclient/blob/master/swiftclient/utils.py#L151

 you'll see that split_request_headers expect options to be a list.
 so, if you apply the example, the code will try to find a ":" in "X" and fail.

 the correct example should be "post_options = {"header": ["X-Delete-After:86400"]}"

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.