From: fumihiko kakuma Date: Wed, 29 Jul 2015 23:17:10 +0000 (+0900) Subject: Python 3: Use '//' instead of '/' X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e3ba447d7f31444ab5c6d56cb408fed84f42792d;p=openstack-build%2Fneutron-build.git 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 --- 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)