test_socket.py: make 2.4 compatible

This commit is contained in:
Denis Bilenko
2009-05-19 17:32:06 +07:00
parent b9aea48d41
commit f45f2e8b84

View File

@@ -889,6 +889,7 @@ class TCPTimeoutTest(SocketTCPTest):
def alarm_handler(signal, frame):
raise Alarm
old_alarm = signal.signal(signal.SIGALRM, alarm_handler)
try:
try:
signal.alarm(2) # POSIX allows alarm to be up to 1 second early
try: