From: Sebastien Bourdeauducq Date: Tue, 20 Oct 2015 08:37:54 +0000 (+0800) Subject: sim: do not use py35 collections.Generator X-Git-Tag: 24jan2021_ls180~2099^2~3^2~8 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60ae9dce0dc24b65c213db47b30c378d0374584b;p=litex.git sim: do not use py35 collections.Generator --- diff --git a/migen/sim/core.py b/migen/sim/core.py index fa571ff3..fc750833 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]