More explicit way of checking presence of image metadata in api/v1/images.py
Bug #1499038 reported by
Itisha Dewan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Wishlist
|
Itisha Dewan |
Bug Description
images.py:
if (orig_status == 'active' and image_meta.get(key) is not None
The checking for the presence of image metadata can be made more explicit, rather than checking if it is None or not.
Changed in glance: | |
assignee: | nobody → Itisha Dewan (ishadewan07) |
Changed in glance: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Changed in glance: | |
status: | Triaged → In Progress |
summary: |
- Redundant check for None value in api/v1/images.py + More explicit way of checking presence of image metadata in + api/v1/images.py |
description: | updated |
Changed in glance: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Proposed fix:
We can reduce the if condition to this:
if image_meta.get(key) != orig_image_ meta.get( key):