Simplify chained comparison
"x < y and y <= z" is equivalent to "x < y <= z" Change-Id: I2e2446d7d2f2b6e1e917dbc46288e93a38f6563e
This commit is contained in:
parent
45d1324146
commit
0007af7df6
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue