From 57bd2dd8572e571e07b1de96ee7e2c998415bb5e Mon Sep 17 00:00:00 2001 From: jand Date: Wed, 29 Dec 2004 15:56:03 +0000 Subject: [PATCH] only check for exception instances in yield clauses --- myhdl/_Simulation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/myhdl/_Simulation.py b/myhdl/_Simulation.py index 81f96359..29ac7143 100644 --- a/myhdl/_Simulation.py +++ b/myhdl/_Simulation.py @@ -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()