sim: generators are also iterables...
This commit is contained in:
parent
02d804feab
commit
1f89900b16
|
@ -211,7 +211,8 @@ class Simulator:
|
||||||
generators = {"sys": generators}
|
generators = {"sys": generators}
|
||||||
self.generators = dict()
|
self.generators = dict()
|
||||||
for k, v in generators.items():
|
for k, v in generators.items():
|
||||||
if isinstance(v, collections.Iterable):
|
if (isinstance(v, collections.Iterable)
|
||||||
|
and not isinstance(v, collections.Generator)):
|
||||||
self.generators[k] = list(v)
|
self.generators[k] = list(v)
|
||||||
else:
|
else:
|
||||||
self.generators[k] = [v]
|
self.generators[k] = [v]
|
||||||
|
|
Loading…
Reference in New Issue