From 0869196ca2c3e7d62ce5d5ee1714f4a531ed6c3b Mon Sep 17 00:00:00 2001 From: Cindy Pallares Date: Mon, 25 May 2015 10:39:08 -0500 Subject: [PATCH] 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 --- glanceclient/v2/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py index 01ce40b9..f5669243 100644 --- a/glanceclient/v2/images.py +++ b/glanceclient/v2/images.py @@ -250,7 +250,7 @@ class Controller(object): except warlock.InvalidOperation as e: raise TypeError(utils.exception_to_str(e)) - if remove_props is not None: + if remove_props: cur_props = image.keys() new_props = kwargs.keys() #NOTE(esheffield): Only remove props that currently exist on the