actorlib/sim/SimActor: do not drive busy low when generator yields None
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 14 Dec 2012 22:56:03 +0000 (23:56 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 14 Dec 2012 22:56:03 +0000 (23:56 +0100)
migen/actorlib/sim.py

index 67f8689eb83a29bde7e7ecf3fc0e7eff5363fe88..d99b909d86bf4527ff084f0c3411f0bceb3870a2 100644 (file)
@@ -60,7 +60,7 @@ class TokenExchanger(PureSimulable):
                        self.active = set()
                else:
                        raise TypeError
-               if all(transaction.idle_wait for transaction in self.active):
+               if self.active and all(transaction.idle_wait for transaction in self.active):
                        self.busy = False
        
        def do_simulation(self, s):