Skip to content

Commit

Permalink
sim: do not use py35 collections.Generator
Browse files Browse the repository at this point in the history
sbourdeauducq committed Oct 20, 2015
1 parent 02e2366 commit 60ae9dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion migen/sim/core.py
Original file line number Diff line number Diff line change
@@ -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 @@ def __init__(self, fragment_or_module, generators, clocks={"sys": 10}, vcd_name=
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]

0 comments on commit 60ae9dc

Please sign in to comment.