Fix pylint "W" missing-timeout warnings
After updating pylint, it started emitting additional "W" warnings in some cases. Fix the missing-timeout ones by adding a timeout=60 value to the calls done by the metadata agent code. Trivialfix Change-Id: Ica5c2a2d3941813b3518b83738ada96bdf7c3760
This commit is contained in:
parent
4757b46646
commit
48f2933060
@ -60,7 +60,6 @@ disable=
|
|||||||
arguments-renamed,
|
arguments-renamed,
|
||||||
broad-exception-raised,
|
broad-exception-raised,
|
||||||
unspecified-encoding,
|
unspecified-encoding,
|
||||||
missing-timeout,
|
|
||||||
redundant-u-string-prefix,
|
redundant-u-string-prefix,
|
||||||
unused-private-member,
|
unused-private-member,
|
||||||
# "C" Coding convention violations
|
# "C" Coding convention violations
|
||||||
|
@ -256,7 +256,8 @@ class MetadataProxyHandler(object):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
data=req.body,
|
data=req.body,
|
||||||
cert=client_cert,
|
cert=client_cert,
|
||||||
verify=verify_cert)
|
verify=verify_cert,
|
||||||
|
timeout=60)
|
||||||
|
|
||||||
if resp.status_code == 200:
|
if resp.status_code == 200:
|
||||||
req.response.content_type = resp.headers['content-type']
|
req.response.content_type = resp.headers['content-type']
|
||||||
|
@ -153,7 +153,8 @@ class MetadataProxyHandler(object):
|
|||||||
headers=headers,
|
headers=headers,
|
||||||
data=req.body,
|
data=req.body,
|
||||||
cert=client_cert,
|
cert=client_cert,
|
||||||
verify=verify_cert)
|
verify=verify_cert,
|
||||||
|
timeout=60)
|
||||||
|
|
||||||
if resp.status_code == 200:
|
if resp.status_code == 200:
|
||||||
req.response.content_type = resp.headers['content-type']
|
req.response.content_type = resp.headers['content-type']
|
||||||
|
@ -434,7 +434,8 @@ class _TestMetadataProxyHandlerCacheMixin(object):
|
|||||||
data=body,
|
data=body,
|
||||||
cert=(self.fake_conf.nova_client_cert,
|
cert=(self.fake_conf.nova_client_cert,
|
||||||
self.fake_conf.nova_client_priv_key),
|
self.fake_conf.nova_client_priv_key),
|
||||||
verify=False)
|
verify=False,
|
||||||
|
timeout=60)
|
||||||
|
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
|
@ -167,7 +167,8 @@ class TestMetadataProxyHandler(base.BaseTestCase):
|
|||||||
data=body,
|
data=body,
|
||||||
cert=(self.fake_conf.nova_client_cert,
|
cert=(self.fake_conf.nova_client_cert,
|
||||||
self.fake_conf.nova_client_priv_key),
|
self.fake_conf.nova_client_priv_key),
|
||||||
verify=False)
|
verify=False,
|
||||||
|
timeout=60)
|
||||||
|
|
||||||
return retval
|
return retval
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user