fix __exit__ for timeout

This commit is contained in:
scottsanderson
2012-08-19 15:00:09 -04:00
parent 69ac68af2e
commit 8b67d6a45c
+1 -1
View File
@@ -61,7 +61,7 @@ class timeout(object):
# Deactivate the alarm on exit. This will re-raise
# any exceptions raised inside the with block.
signal.signal(signal.SIGALRM, self.handler)
signal.setitimer(signal.ITIMER_REAL, self.seconds, 0)
signal.setitimer(signal.ITIMER_REAL, 0, 0)
class heartbeat(object):
"""