From 60ae9dce0dc24b65c213db47b30c378d0374584b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 20 Oct 2015 16:37:54 +0800 Subject: [PATCH] sim: do not use py35 collections.Generator --- migen/sim/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migen/sim/core.py b/migen/sim/core.py index fa571ff38..fc750833c 100644 --- a/migen/sim/core.py +++ b/migen/sim/core.py @@ -1,5 +1,6 @@ import operator import collections +import inspect from migen.fhdl.structure import * from migen.fhdl.structure import (_Value, _Statement, @@ -219,7 +220,7 @@ class Simulator: self.generators = dict() for k, v in generators.items(): if (isinstance(v, collections.Iterable) - and not isinstance(v, collections.Generator)): + and not inspect.isgenerator(v)): self.generators[k] = list(v) else: self.generators[k] = [v]