sim: accept iterables as generator list

This commit is contained in:
Sebastien Bourdeauducq 2015-10-19 19:18:17 +08:00
parent 0999a17319
commit 02d804feab
1 changed files with 2 additions and 2 deletions

View File

@ -211,8 +211,8 @@ class Simulator:
generators = {"sys": generators}
self.generators = dict()
for k, v in generators.items():
if isinstance(v, list):
self.generators[k] = v
if isinstance(v, collections.Iterable):
self.generators[k] = list(v)
else:
self.generators[k] = [v]