| From fcdc356c12c2ced673b6aac3d44e5ad48ff7b552 Mon Sep 17 00:00:00 2001 |
| From: Benjamin Pollack <benjamin@bitquabit.com> |
| Date: Mon, 20 Mar 2017 15:29:08 -0400 |
| Subject: [PATCH] Fix for Python 3 |
| |
| --- |
| scripts/ud_opcode.py | 6 +++--- |
| 1 file changed, 3 insertions(+), 3 deletions(-) |
| |
| diff --git a/scripts/ud_opcode.py b/scripts/ud_opcode.py |
| index 4a4b74c..aeff64b 100644 |
| --- a/scripts/ud_opcode.py |
| +++ b/scripts/ud_opcode.py |
| @@ -521,17 +521,17 @@ def getTableList(self): |
| |
| def getMnemonicsList(self): |
| """Returns a sorted list of mnemonics""" |
| - return sorted(self._mnemonics.keys()) |
| + return sorted(self._mnemonics) |
| |
| def pprint(self): |
| def printWalk(tbl, indent=""): |
| entries = tbl.entries() |
| for k, e in entries: |
| if isinstance(e, UdOpcodeTable): |
| - self.log("%s |-<%02x> %s" % (indent, k, e)) |
| + self.log("%s |-<%02x> %s" % (indent, int(k), e)) |
| printWalk(e, indent + " |") |
| elif isinstance(e, UdInsnDef): |
| - self.log("%s |-<%02x> %s" % (indent, k, e)) |
| + self.log("%s |-<%02x> %s" % (indent, int(k), e)) |
| |
| printWalk(self.root) |
| |