diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2015-10-09 16:51:27 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-10-11 22:10:27 +0900 |
commit | e4f4704b73725585dc33461bf47e2815994a6f1f (patch) | |
tree | 7f151c0a0a7f4a854d6fd4b81a7e77d036cc56be | |
parent | e4333e328676cca0f8a53c932bba4d36b7702b5b (diff) |
tester: Use six.binary_type for binary data comparison
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/tests/switch/tester.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ryu/tests/switch/tester.py b/ryu/tests/switch/tester.py index 5182d45e..c01e8b93 100644 --- a/ryu/tests/switch/tester.py +++ b/ryu/tests/switch/tester.py @@ -953,7 +953,7 @@ class OfTester(app_manager.RyuApp): def _diff_packets(self, model_pkt, rcv_pkt): msg = [] for rcv_p in rcv_pkt.protocols: - if type(rcv_p) != str: + if not isinstance(rcv_p, six.binary_type): model_protocols = model_pkt.get_protocols(type(rcv_p)) if len(model_protocols) == 1: model_p = model_protocols[0] @@ -980,7 +980,7 @@ class OfTester(app_manager.RyuApp): else: model_p = '' for p in model_pkt.protocols: - if type(p) == str: + if isinstance(rcv_p, six.binary_type): model_p = p break if model_p != rcv_p: |