python3: Calculate the number of ports as integer

Signed-off-by: Fumihiko Kakuma <kakuma@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
fumihiko kakuma 2015-06-29 16:00:59 +09:00 committed by FUJITA Tomonori
parent 8c8be53de6
commit 25b3f23c2f
2 changed files with 2 additions and 2 deletions

View File

@ -1686,7 +1686,7 @@ class OFPSwitchFeatures(MsgBase):
ofproto.OFP_HEADER_SIZE)
msg.ports = {}
n_ports = ((msg_len - ofproto.OFP_SWITCH_FEATURES_SIZE) /
n_ports = ((msg_len - ofproto.OFP_SWITCH_FEATURES_SIZE) //
ofproto.OFP_PHY_PORT_SIZE)
offset = ofproto.OFP_SWITCH_FEATURES_SIZE
for _i in range(n_ports):

View File

@ -406,7 +406,7 @@ class OFPSwitchFeatures(MsgBase):
ofproto.OFP_HEADER_SIZE)
msg.ports = {}
n_ports = ((msg_len - ofproto.OFP_SWITCH_FEATURES_SIZE) /
n_ports = ((msg_len - ofproto.OFP_SWITCH_FEATURES_SIZE) //
ofproto.OFP_PORT_SIZE)
offset = ofproto.OFP_SWITCH_FEATURES_SIZE
for i in range(n_ports):