Avoid using `len(x)` to check if x is empty
Bug #1538518 reported by
Illia Khudoshyn
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rally |
Fix Released
|
Wishlist
|
Steve Wilkerson |
Bug Description
`len()` is used to check if collection (e.g., a dict, list, set, etc.) has items. As collections have a boolean representation too, it is better to directly check for true / false.
rally/common/
rally/task/utils.py
rally/task/
tests/unit/
Changed in rally: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Changed in rally: | |
assignee: | nobody → Steve Wilkerson (sw5822) |
Changed in rally: | |
status: | Triaged → In Progress |
Changed in nova: | |
assignee: | nobody → Ren Qiaowei (qiaowei-ren) |
status: | New → In Progress |
Changed in swift: | |
assignee: | nobody → Ren Qiaowei (qiaowei-ren) |
status: | New → In Progress |
Changed in glance: | |
assignee: | nobody → Ren Qiaowei (qiaowei-ren) |
status: | New → In Progress |
Changed in cinder: | |
assignee: | nobody → Ren Qiaowei (qiaowei-ren) |
status: | New → In Progress |
Changed in ceilometer: | |
assignee: | nobody → Ren Qiaowei (qiaowei-ren) |
status: | New → In Progress |
Changed in neutron: | |
assignee: | nobody → Ren Qiaowei (qiaowei-ren) |
status: | New → In Progress |
description: | updated |
no longer affects: | neutron |
Changed in swift: | |
importance: | Undecided → Wishlist |
description: | updated |
no longer affects: | glance |
no longer affects: | nova |
no longer affects: | swift |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/276996
Review: https:/