From 5b7fee0641566fc8e26d7817573b0135f98693bd Mon Sep 17 00:00:00 2001 From: IWAMOTO Toshihiro Date: Wed, 24 Jun 2015 18:47:06 +0900 Subject: [PATCH] python3: Open packet data with binary mode Signed-off-by: IWAMOTO Toshihiro Signed-off-by: FUJITA Tomonori --- ryu/tests/unit/packet/test_bgp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/tests/unit/packet/test_bgp.py b/ryu/tests/unit/packet/test_bgp.py index ca127ee2..92a6dad9 100644 --- a/ryu/tests/unit/packet/test_bgp.py +++ b/ryu/tests/unit/packet/test_bgp.py @@ -201,7 +201,7 @@ class Test_bgp(unittest.TestCase): for f in files: print('testing %s' % f) - binmsg = open(dir + f).read() + binmsg = open(dir + f, 'rb').read() msg, rest = bgp.BGPMessage.parser(binmsg) binmsg2 = msg.serialize() eq_(binmsg, binmsg2)