Logic check for removing properties in V2 doesn't work as expected

Bug #1475053 reported by Cindy Pallares
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Undecided
Unassigned

Bug Description

The check used to verify if there are any properties to remove in the V2 image-update command will execute no matter what due to the check that verifies if remove_prop is not None. remove_props is passed from the client as an empty list when there is nothing to remove, so it will always execute that block of code since an empty list does not identify as None.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/185413
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=0869196ca2c3e7d62ce5d5ee1714f4a531ed6c3b
Submitter: Jenkins
Branch: master

commit 0869196ca2c3e7d62ce5d5ee1714f4a531ed6c3b
Author: Cindy Pallares <email address hidden>
Date: Mon May 25 10:39:08 2015 -0500

    Fix the remove property logic in V2

    The check used to verify if there are any properties to remove in the V2
    image-update command will always execute even if there are no properties to
    remove due to the fact that it checks if remove_prop is not None, when it is
    actually a list and not a None value.

    Closes-Bug: #1475053
    Change-Id: Ia36e945b880de3514c73073a392bdb7dde13cf84

Changed in python-glanceclient:
status: New → Fix Committed
Changed in python-glanceclient:
milestone: none → 1.1.0
status: Fix Committed → Fix Released
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.