display of subnet information broken if service_types attribute not present

Bug #1656363 reported by Per Boussard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
aohuanxuan

Bug Description

With at least versions 3.5 and 3.6 of python openstack-client (maybe even previous versions, I have not made an exhaustive investigation) there seems to be an assumption that a query for subnet information will return a service_types element in the JSON data returned for e.g. "openstack subnet show '<subnet name>'". If the returned JSON data does not contain such an element, the method utils.format_list of the lib-osc will receive a None argument, which causes python-openstackclient to throw an exception since None is not an enumerable type.

aohuanxuan (huanxuan-ao)
Changed in python-openstackclient:
assignee: nobody → aohuanxuan (huanxuan-ao)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to osc-lib (master)

Fix proposed to branch: master
Review: https://review.openstack.org/434768

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/434768
Committed: https://git.openstack.org/cgit/openstack/osc-lib/commit/?id=e45dc8776e7c44ffb09f650b12b65246e5d2b375
Submitter: Jenkins
Branch: master

commit e45dc8776e7c44ffb09f650b12b65246e5d2b375
Author: Huanxuan Ao <email address hidden>
Date: Thu Feb 16 17:15:44 2017 +0800

    Avoid 'NoneType' error when format conversion

    Error raise when changing a 'None' data to a new format:
    "TypeError: 'NoneType' object is not iterable"
    we also met that bug before in the previous patch [1]

    This change is to handle the 'None' data and avoid
    the error

    [1] https://review.openstack.org/#/c/420420/

    Change-Id: I649b4fc65ef7c19b8193b07f3bd59f00e6095f9f
    Closes-bug: #1656363

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.4.0

This issue was fixed in the openstack/osc-lib 1.4.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.