提交 5ec2e913 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

added a type check that I had added earlier but evidently git lost

上级 ac45ec9a
......@@ -737,6 +737,9 @@ def general_toposort(r_out, deps, debug_print=False):
if io not in deps_cache:
d = deps(io)
if d:
if not isinstance(d, (list, OrderedSet)):
raise TypeError("Non-deterministic collections here make"
" toposort non-deterministic.")
deps_cache[io] = list(d)
else:
deps_cache[io] = d
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论