From e3ba447d7f31444ab5c6d56cb408fed84f42792d Mon Sep 17 00:00:00 2001 From: fumihiko kakuma Date: Thu, 30 Jul 2015 08:17:10 +0900 Subject: [PATCH] Python 3: Use '//' instead of '/' In python 3, division(/) returns a float. So use '//' instead of '/' in the case that an integer is required. Change-Id: I9170ea57d5b967533767871fa612a02d797cda17 Blueprint: neutron-python3 --- neutron/db/agentschedulers_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron/db/agentschedulers_db.py b/neutron/db/agentschedulers_db.py index 3b682f1e3..212c6eb55 100644 --- a/neutron/db/agentschedulers_db.py +++ b/neutron/db/agentschedulers_db.py @@ -122,7 +122,7 @@ class AgentSchedulerDbMixin(agents_db.AgentDbMixin): self.periodic_agent_loop = loopingcall.FixedIntervalLoopingCall( function) # TODO(enikanorov): make interval configurable rather than computed - interval = max(cfg.CONF.agent_down_time / 2, 1) + interval = max(cfg.CONF.agent_down_time // 2, 1) # add random initial delay to allow agents to check in after the # neutron server first starts. random to offset multiple servers initial_delay = random.randint(interval, interval * 2) -- 2.45.2