osc-lib find() throws TypeError

Bug #1739882 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Rabi Mishra

Bug Description

When using find() interface without specifying attr argument, secondary search throws TypeError as it uses kwargs = {None: value}

Dec 22 13:51:54.625702 ubuntu-xenial-rax-iad-0001576410 heat-engine[26104]: 2017-12-22 13:51:54.609 27605 TRACE heat.engine.resource response = self.find(path=const.BASE_POOL_URL, value=pool_id)
Dec 22 13:51:54.625918 ubuntu-xenial-rax-iad-0001576410 heat-engine[26104]: 2017-12-22 13:51:54.609 27605 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/osc_lib/api/api.py", line 408, in find
Dec 22 13:51:54.626106 ubuntu-xenial-rax-iad-0001576410 heat-engine[26104]: 2017-12-22 13:51:54.609 27605 TRACE heat.engine.resource **kwargs
Dec 22 13:51:54.626437 ubuntu-xenial-rax-iad-0001576410 heat-engine[26104]: 2017-12-22 13:51:54.609 27605 TRACE heat.engine.resource TypeError: find_one() keywords must be strings

Rabi Mishra (rabi)
Changed in python-openstackclient:
assignee: nobody → Rabi Mishra (rabi)
Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to osc-lib (master)

Reviewed: https://review.openstack.org/529934
Committed: https://git.openstack.org/cgit/openstack/osc-lib/commit/?id=a9893be62416e04e10ff42cba0d64e70353c6f94
Submitter: Zuul
Branch: master

commit a9893be62416e04e10ff42cba0d64e70353c6f94
Author: rabi <email address hidden>
Date: Sat Dec 23 19:01:50 2017 +0530

    Fix find() interface when attr is not specified

    It seems to use None as the attr key and throws TypeError.
    Let's not do the secondary search when attr is not specified.

    Change-Id: Ic240d19f48d362ab74a91bace5eab31542823718
    Closes-Bug: #1739882

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/osc-lib 1.9.0

This issue was fixed in the openstack/osc-lib 1.9.0 release.

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.