Fix py3 compatibility

In fetch_and_sync_all_routers method is used python's range function.
Range function accepts integers.

This patch is fixing divide behaviour in py3 where result number is float,
by retyping float to int as it is represented in py2.

Change-Id: Ifffdee0d4a3226d4871cfabd0bdbf13d7058a83e
Closes-Bug: #1824334
This commit is contained in:
Michal Arbet 2019-04-11 17:14:48 +02:00 committed by Rodolfo Alonso Hernandez
parent 7d48bde722
commit 49a66dba31
1 changed files with 1 additions and 1 deletions

View File

@ -876,7 +876,7 @@ class L3NATAgent(ha.AgentMixin,
except oslo_messaging.MessagingTimeout:
if self.sync_routers_chunk_size > SYNC_ROUTERS_MIN_CHUNK_SIZE:
self.sync_routers_chunk_size = max(
self.sync_routers_chunk_size / 2,
self.sync_routers_chunk_size // 2,
SYNC_ROUTERS_MIN_CHUNK_SIZE)
LOG.error('Server failed to return info for routers in '
'required time, decreasing chunk size to: %s',