Fix dht python test failure with python3.7
authorng0 <ng0@n0.is>
Wed, 13 Feb 2019 14:19:16 +0000 (14:19 +0000)
committerng0 <ng0@n0.is>
Wed, 13 Feb 2019 14:19:16 +0000 (14:19 +0000)
src/dht/test_dht_tools.py.in

index 05582cbd06202ff866457e1b44f9748912dd977f..38a9f9622590c7fc528b62f91c97fca06ade6be6 100644 (file)
@@ -124,7 +124,7 @@ time.sleep(1)
 
 print("TEST: Testing get...", end='')
 rc, stdo, stde = r_get(['-k', 'testkey', '-T', '50 ms', '-t', '8'], want_stdo=True, failer=end_arm_failer)
-stdo = stdo.replace('\r', '').splitlines()
+stdo = stdo.decode('utf-8').replace('\r', '').splitlines()
 expect = "Result 0, type 8:\ntestdata".splitlines()
 if len(stdo) != 2 or len(expect) != 2 or stdo[0] != expect[0] or stdo[1] != expect[1]:
     fail("output `{}' differs from expected `{}'".format(stdo, expect))