def wait(self, state, interval=0.1):
"""Wait for the given state."""
- while self.state != state:
+ while self.state != state:
+ # From http://psyco.sourceforge.net/psycoguide/bugs.html:
+ # "The compiled machine code does not include the regular polling
+ # done by Python, meaning that a KeyboardInterrupt will not be
+ # detected before execution comes back to the regular Python
+ # interpreter. Your program cannot be interrupted if caught
+ # into an infinite Psyco-compiled loop."
+ except (KeyError, AttributeError):
"""Re-execute the current process.