mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-05 19:00:56 +01:00
- forgot these lines in my last commit (r8177)
This commit is contained in:
parent
f9c2aaaf27
commit
7fb87cef21
@ -1847,12 +1847,12 @@ def http_request(method, url, headers={}, data=None, file=None, timeout=100):
|
|||||||
|
|
||||||
old_timeout = socket.getdefaulttimeout()
|
old_timeout = socket.getdefaulttimeout()
|
||||||
# XXX: dirty hack as timeout doesn't work with python-m2crypto
|
# XXX: dirty hack as timeout doesn't work with python-m2crypto
|
||||||
if old_timeout != timeout and api_host_options['sslcertck'] == 0:
|
if old_timeout != timeout and not api_host_options['sslcertck']:
|
||||||
socket.setdefaulttimeout(timeout)
|
socket.setdefaulttimeout(timeout)
|
||||||
try:
|
try:
|
||||||
fd = urllib2.urlopen(req, data=data)
|
fd = urllib2.urlopen(req, data=data)
|
||||||
finally:
|
finally:
|
||||||
if old_timeout != timeout and api_host_options['sslcertck'] == 0:
|
if old_timeout != timeout and not api_host_options['sslcertck']:
|
||||||
socket.setdefaulttimeout(old_timeout)
|
socket.setdefaulttimeout(old_timeout)
|
||||||
if hasattr(conf.cookiejar, 'save'):
|
if hasattr(conf.cookiejar, 'save'):
|
||||||
conf.cookiejar.save(ignore_discard=True)
|
conf.cookiejar.save(ignore_discard=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user