From 0007af7df6d0821d15b3ed42a294f34e90e5a3d8 Mon Sep 17 00:00:00 2001 From: Eyal Date: Mon, 4 Apr 2016 17:22:22 +0300 Subject: [PATCH] Simplify chained comparison "x < y and y <= z" is equivalent to "x < y <= z" Change-Id: I2e2446d7d2f2b6e1e917dbc46288e93a38f6563e --- neutron/db/quota/driver.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neutron/db/quota/driver.py b/neutron/db/quota/driver.py index d82dabb40f6..3f865cb6015 100644 --- a/neutron/db/quota/driver.py +++ b/neutron/db/quota/driver.py @@ -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))