Mailinglist Archive: opensuse-buildservice (239 mails)

< Previous Next >
Re: [opensuse-buildservice] osc r7259 (timeout) depends on Python 2.6
On 2009-05-08 10:44:00 +0200, Peter Poeml wrote:
On Thu, May 07, 2009 at 07:17:11 +0200, Marcus Hüwe wrote:
I think this should be ok - in the end urllib2 passes the timeout parameter
to httplib which passes it to the socket module. Using a global timeout for
all osc requests won't harm IMHO (if some command doesn't need it can use
http_GET(url, timeout=None) to disable the default timeout).

I don't think that it harms either. I was only wondering if the setting
via socket.setdefaulttimeout would be more global than setting it
via the http_* methods, and would have a broader effect. But it has the
same result I guess.

Using setdefaulttimeout is probably more "global" than the way how it is done
in python26's urllib2/httplib but we directly restore the default after we made
the request (so in most cases it shouldn't have any side effects).

Does the attached patch work with python24?

It works with python25 (and I see no reason why it shouldn't work with
2.4 as well).

Ok - committed (r7290).

To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >