python socket.gethostbyaddr() -- reduce timeout?
14:37 13 Jan 2012

socket.gethostbyname() works great when its argument is a real hostname. But when it's a nonexistent host, I get a 3 second timeout followed by

socket.gaierror: [Errno 11001] getaddrinfo failed

I don't mind the exception (it's appropriate), but is there any way to reduce the timeout?

python dns ip-address