Note: ofproto_v1_[034]_parser was done in previous commits.
Signed-off-by: IWASE Yusuke <[email protected]>
---
ryu/ofproto/ofproto_v1_5_parser.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/ryu/ofproto/ofproto_v1_5_parser.py
b/ryu/ofproto/ofproto_v1_5_parser.py
index 4b6b235..02f980c 100644
--- a/ryu/ofproto/ofproto_v1_5_parser.py
+++ b/ryu/ofproto/ofproto_v1_5_parser.py
@@ -2059,7 +2059,7 @@ class OFPPort(StringifyMixin):
(port_no, length, hw_addr, name, config, state) = struct.unpack_from(
ofproto.OFP_PORT_PACK_STR, buf, offset)
hw_addr = addrconv.mac.bin_to_text(hw_addr)
- name = name.rstrip('\0')
+ name = name.rstrip(b'\0')
props = []
rest = buf[offset + ofproto.OFP_PORT_SIZE:offset + length]
while rest:
@@ -2319,7 +2319,7 @@ class
OFPDescStats(ofproto_parser.namedtuple('OFPDescStats', (
desc = struct.unpack_from(ofproto.OFP_DESC_PACK_STR,
buf, offset)
desc = list(desc)
- desc = [x.rstrip('\0') for x in desc]
+ desc = [x.rstrip(b'\0') for x in desc]
stats = cls(*desc)
stats.length = ofproto.OFP_DESC_SIZE
return stats
@@ -2415,7 +2415,7 @@ class OFPTableFeaturesStats(StringifyMixin):
table_features.max_entries
) = struct.unpack_from(ofproto.OFP_TABLE_FEATURES_PACK_STR,
buf, offset)
- table_features.name = name.rstrip('\0')
+ table_features.name = name.rstrip(b'\0')
props = []
rest = buf[offset + ofproto.OFP_TABLE_FEATURES_SIZE:
--
1.9.1
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel