Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def handle_timeout():
- ... important cleanup logic ...
- signal.signal(signal.SIGALRM, handle_timeout) # <-- why no TypeError here?
- signal.alarm(MY_APPLICATION_TIME_LIMIT)
- ... do stuff and then if we take too long ...
- # py2: TypeError: handle_timeout() takes no arguments
- # py3: TypeError: handle_timeout() takes 0 positional arguments but 2 were given
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement