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:
parent
7d48bde722
commit
49a66dba31
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue