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
This commit is contained in:
fumihiko kakuma 2015-07-30 08:17:10 +09:00
parent 50d662d95a
commit e3ba447d7f
1 changed files with 1 additions and 1 deletions

View File

@ -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)