about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm/ir/symbexec.py5
-rw-r--r--miasm/jitter/jitload.py10
2 files changed, 9 insertions, 6 deletions
diff --git a/miasm/ir/symbexec.py b/miasm/ir/symbexec.py
index 2acd293d..2e6b07df 100644
--- a/miasm/ir/symbexec.py
+++ b/miasm/ir/symbexec.py
@@ -1,7 +1,10 @@
 from __future__ import print_function
 from builtins import range
 import logging
-from collections import MutableMapping
+try:
+    from collections.abc import MutableMapping
+except ImportError:
+    from collections import MutableMapping
 
 from future.utils import viewitems
 
diff --git a/miasm/jitter/jitload.py b/miasm/jitter/jitload.py
index d991d728..d92bf6ad 100644
--- a/miasm/jitter/jitload.py
+++ b/miasm/jitter/jitload.py
@@ -3,9 +3,9 @@ import warnings
 from functools import wraps
 from collections import namedtuple
 try:
-    from collections.abc import Sequence
+    from collections.abc import Sequence, Iterator
 except ImportError:
-    from collections import Sequence
+    from collections import Sequence, Iterator
 
 from future.utils import viewitems
 
@@ -374,7 +374,7 @@ class Jitter(object):
         old_pc = self.pc
         for res in self.breakpoints_handler.call_callbacks(self.pc, self):
             if res is not True:
-                if isinstance(res, collections.Iterator):
+                if isinstance(res, Iterator):
                     # If the breakpoint is a generator, yield it step by step
                     for tmp in res:
                         yield tmp
@@ -385,7 +385,7 @@ class Jitter(object):
         exception_flag = self.get_exception()
         for res in self.exceptions_handler(exception_flag, self):
             if res is not True:
-                if isinstance(res, collections.Iterator):
+                if isinstance(res, Iterator):
                     for tmp in res:
                         yield tmp
                 else:
@@ -407,7 +407,7 @@ class Jitter(object):
         exception_flag = self.get_exception()
         for res in self.exceptions_handler(exception_flag, self):
             if res is not True:
-                if isinstance(res, collections.Iterator):
+                if isinstance(res, Iterator):
                     for tmp in res:
                         yield tmp
                 else: