From eb20e884ace39f4f35869a1011f9744c39f3ae18 Mon Sep 17 00:00:00 2001 From: Assaf Muller Date: Wed, 9 Jul 2014 15:54:10 +0300 Subject: [PATCH] Refactor 'if false do nothing' logic in l3 scheduler db Change-Id: I67983bb1115857ab11e3269fcbe1b20c85c93dbb --- neutron/db/l3_agentschedulers_db.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/neutron/db/l3_agentschedulers_db.py b/neutron/db/l3_agentschedulers_db.py index 19969cb60..e9a63d28d 100644 --- a/neutron/db/l3_agentschedulers_db.py +++ b/neutron/db/l3_agentschedulers_db.py @@ -163,9 +163,7 @@ class L3AgentSchedulerDbMixin(l3agentscheduler.L3AgentSchedulerPluginBase, query = query.filter( RouterL3AgentBinding.l3_agent_id == agent.id) - if not router_ids: - pass - else: + if router_ids: query = query.filter( RouterL3AgentBinding.router_id.in_(router_ids)) router_ids = [item[0] for item in query] -- 2.45.2