mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-09 06:16:10 +02:00
python3: Open packet data with binary mode
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
a23734444c
commit
5b7fee0641
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user