summaryrefslogtreecommitdiffstats
path: root/openstack/common/policy.py
diff options
context:
space:
mode:
authorZhongyue Luo <zhongyue.nah@intel.com>2013-05-10 23:15:08 +0800
committerZhongyue Luo <zhongyue.nah@intel.com>2013-05-13 18:15:10 +0800
commita51469326e84ed977ecc4e57fd3d46cdc21aa08f (patch)
treea22f42c9bf362d06f43efd618579345f74a785cf /openstack/common/policy.py
parent20379f2816774469287502cf857dc01a93ad1370 (diff)
downloadoslo-a51469326e84ed977ecc4e57fd3d46cdc21aa08f.tar.gz
oslo-a51469326e84ed977ecc4e57fd3d46cdc21aa08f.tar.xz
oslo-a51469326e84ed977ecc4e57fd3d46cdc21aa08f.zip
Removes len() on empty sequence evaluation
PEP8 suggestes, "For sequences, use the fact that empty sequences are false." Change-Id: I4c600a7a6230a55328ee46f7c59f340f37abc18f
Diffstat (limited to 'openstack/common/policy.py')
-rw-r--r--openstack/common/policy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack/common/policy.py b/openstack/common/policy.py
index 21ea010..cd6dcfc 100644
--- a/openstack/common/policy.py
+++ b/openstack/common/policy.py
@@ -437,7 +437,7 @@ def _parse_list_rule(rule):
or_list.append(AndCheck(and_list))
# If we have only one check, omit the "or"
- if len(or_list) == 0:
+ if not or_list:
return FalseCheck()
elif len(or_list) == 1:
return or_list[0]