diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2015-02-17 12:23:42 +0100 |
|---|---|---|
| committer | serpilliere <serpilliere@users.noreply.github.com> | 2015-02-17 12:23:42 +0100 |
| commit | c47688a9e8e049165a76b9bb3281c0381fa2d12f (patch) | |
| tree | c1f68a979bfac603a3beccea678d4b8cfe3391dc /miasm2/core | |
| parent | 13a3fcbb168589703d56d6c36312d788f68786e3 (diff) | |
| parent | 0fcd954e10351f914b37a96d498aec39feb30b24 (diff) | |
| download | miasm-c47688a9e8e049165a76b9bb3281c0381fa2d12f.tar.gz miasm-c47688a9e8e049165a76b9bb3281c0381fa2d12f.zip | |
Merge pull request #71 from commial/pylinting
Pylinting
Diffstat (limited to '')
| -rw-r--r-- | miasm2/core/asmbloc.py | 2 | ||||
| -rw-r--r-- | miasm2/core/cpu.py | 8 | ||||
| -rw-r--r-- | miasm2/core/parse_asm.py | 1 |
3 files changed, 5 insertions, 6 deletions
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py index ee93cba7..cb8423f6 100644 --- a/miasm2/core/asmbloc.py +++ b/miasm2/core/asmbloc.py @@ -219,7 +219,7 @@ class asm_bloc: l = self.lines[i] if l.splitflow() or l.breakflow(): raise NotImplementedError('not fully functional') - return l + def get_subcall_instr(self): if not self.lines: diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index 3fbe1e22..ce6cf288 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -8,8 +8,8 @@ from pyparsing import * from miasm2.expression.expression import * from miasm2.core import asmbloc from collections import defaultdict -from bin_stream import bin_stream, bin_stream_str -from utils import Disasm_Exception +from miasm2.core.bin_stream import bin_stream, bin_stream_str +from miasm2.core.utils import Disasm_Exception from miasm2.expression.simplifications import expr_simp log = logging.getLogger("cpuhelper") @@ -1514,7 +1514,7 @@ class cls_mn(object): o = [] for c, v in candidates: o += v - o.sort(key=lambda x: len(x)) + o.sort(key=len) return o def value(self, mode): @@ -1564,7 +1564,7 @@ class cls_mn(object): if ((index, [xx[1].value for xx in to_decode]) in todo or (index, [xx[1].value for xx in to_decode]) in done): raise NotImplementedError('not fully functional') - continue + for p, f in to_decode: fnew = f.clone() o.append((p, fnew)) diff --git a/miasm2/core/parse_asm.py b/miasm2/core/parse_asm.py index f29a9839..dba097fa 100644 --- a/miasm2/core/parse_asm.py +++ b/miasm2/core/parse_asm.py @@ -2,7 +2,6 @@ #-*- coding:utf-8 -*- import re -import struct import miasm2.expression.expression as m2_expr from miasm2.core.asmbloc import * from miasm2.core.utils import pck |