Simplify chained comparison

"x < y and y <= z" is equivalent to "x < y <= z"

Change-Id: I2e2446d7d2f2b6e1e917dbc46288e93a38f6563e
This commit is contained in:
Eyal 2016-04-04 17:22:22 +03:00
parent 45d1324146
commit 0007af7df6
1 changed files with 1 additions and 2 deletions

View File

@ -254,7 +254,6 @@ class DbQuotaDriver(object):
# Check the quotas and construct a list of the resources that
# would be put over limit by the desired values
overs = [key for key, val in values.items()
if quotas[key] >= 0 and quotas[key] < val]
overs = [key for key, val in values.items() if 0 <= quotas[key] < val]
if overs:
raise exceptions.OverQuota(overs=sorted(overs))