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,
|
||||
broad-exception-raised,
|
||||
unspecified-encoding,
|
||||
missing-timeout,
|
||||
redundant-u-string-prefix,
|
||||
unused-private-member,
|
||||
# "C" Coding convention violations
|
||||
|
@ -256,7 +256,8 @@ class MetadataProxyHandler(object):
|
||||
headers=headers,
|
||||
data=req.body,
|
||||
cert=client_cert,
|
||||
verify=verify_cert)
|
||||
verify=verify_cert,
|
||||
timeout=60)
|
||||
|
||||
if resp.status_code == 200:
|
||||
req.response.content_type = resp.headers['content-type']
|
||||
|
@ -153,7 +153,8 @@ class MetadataProxyHandler(object):
|
||||
headers=headers,
|
||||
data=req.body,
|
||||
cert=client_cert,
|
||||
verify=verify_cert)
|
||||
verify=verify_cert,
|
||||
timeout=60)
|
||||
|
||||
if resp.status_code == 200:
|
||||
req.response.content_type = resp.headers['content-type']
|
||||
|
@ -434,7 +434,8 @@ class _TestMetadataProxyHandlerCacheMixin(object):
|
||||
data=body,
|
||||
cert=(self.fake_conf.nova_client_cert,
|
||||
self.fake_conf.nova_client_priv_key),
|
||||
verify=False)
|
||||
verify=False,
|
||||
timeout=60)
|
||||
|
||||
return retval
|
||||
|
||||
|
@ -167,7 +167,8 @@ class TestMetadataProxyHandler(base.BaseTestCase):
|
||||
data=body,
|
||||
cert=(self.fake_conf.nova_client_cert,
|
||||
self.fake_conf.nova_client_priv_key),
|
||||
verify=False)
|
||||
verify=False,
|
||||
timeout=60)
|
||||
|
||||
return retval
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user