From 02bbb30efea4980c9d133947cbbf69fb599071ad Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Mon, 25 Feb 2019 11:09:54 +0100 Subject: Support python2/python3 --- test/arch/mips32/unit/asm_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/arch/mips32/unit/asm_test.py') diff --git a/test/arch/mips32/unit/asm_test.py b/test/arch/mips32/unit/asm_test.py index da792874..7a50b38e 100644 --- a/test/arch/mips32/unit/asm_test.py +++ b/test/arch/mips32/unit/asm_test.py @@ -1,6 +1,8 @@ import sys import os +from future.utils import viewitems + from miasm2.arch.mips32.arch import mn_mips32 from miasm2.core import parse_asm from miasm2.expression.expression import * @@ -30,10 +32,10 @@ class Asm_Test(object): loc_db.set_location_offset(loc_db.get_name_location("main"), 0x0) s = StrPatchwork() patches = asmblock.asm_resolve_final(mn_mips32, blocks, loc_db) - for offset, raw in patches.items(): + for offset, raw in viewitems(patches): s[offset] = raw - s = str(s) + s = bytes(s) self.assembly = s def run(self): -- cgit 1.4.1