[Yum-devel] urlgrabber socket timeouts
skvidal at phy.duke.edu
Wed Sep 29 13:55:18 UTC 2004
On Wed, 2004-09-29 at 09:51, Ryan Tomayko wrote:
> If we wanted to get crufty and support < 2.2 we could do something like:
> import socket
> if hasattr(socket, 'setdefaulttimeout'):
> set_timeout = socket.setdefaulttimeout
> import timeoutsocket
> set_timeout = timeoutsocket.setDefaultSocketTimeout
> except ImportError:
> # no possible way of supporting timeout
> set_timeout = None
> Now we can call set_timeout to support both Python 2.3's native support
> or, failing that, the timeoutsocket hack for < 2.3.
> Not sure all this is worth it but I thought I'd throw it out there.
Yah, I'm not sure it's worth it either for that part.
2.2 systems will slowly dwindle, I think. Still a lot of rhel3 systems
out there on 2.2, though.
More information about the Yum-devel