yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #38884
[Bug 1499038] [NEW] Redundant check for None value in api/v1/images.py
Public bug reported:
images.py
if (orig_status == 'active' and image_meta.get(key) is not None
and image_meta.get(key) != orig_image_meta.get(key)):
We do not need to check if the immutable image metadata is None or not.
All that we care if whether or not a new value of image metadata is
passed. The 'get' operation returns None anyway if the key is not
present in the dictionary.
** Affects: glance
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1499038
Title:
Redundant check for None value in api/v1/images.py
Status in Glance:
New
Bug description:
images.py
if (orig_status == 'active' and image_meta.get(key) is not None
and image_meta.get(key) != orig_image_meta.get(key)):
We do not need to check if the immutable image metadata is None or
not. All that we care if whether or not a new value of image metadata
is passed. The 'get' operation returns None anyway if the key is not
present in the dictionary.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1499038/+subscriptions
Follow ups