1
0
mirror of https://github.com/myhdl/myhdl.git synced 2025-01-24 21:52:56 +08:00

only check for exception instances in yield clauses

This commit is contained in:
jand 2004-12-29 15:56:03 +00:00
parent 74e62edf93
commit 57bd2dd857

View File

@ -154,13 +154,13 @@ class Simulation(object):
_append(_Waiter(clause._generator(), clone))
elif clause is None:
_append(clone)
elif isinstance(clause, Exception) or \
issubclass(clause, Exception):
elif isinstance(clause, Exception):
_append(clone)
if not exc:
exc = clause
else:
raise TypeError, "yield clause '%s'" % `clause`
raise TypeError("type of yield clause %s is %s" %
(repr(clause), type(clause)))
if cosim:
cosim._get()