mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-03 12:40:47 +08:00
fix __exit__ for timeout
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user