http client: ensure timeout is an int
It could otherwise lead to errors like: Timeout value connect was 15, but it must be an int, float or None Change-Id: I7b426c88a09f27ca2d645fd05227c2cf106d8d1e
This commit is contained in:
parent
e7619066f1
commit
d957ab9552
@ -36,7 +36,7 @@ class HttpClient(object):
|
||||
|
||||
self.endpoint = endpoint.rstrip("/")
|
||||
self.auth = auth
|
||||
self.timeout = timeout
|
||||
self.timeout = int(timeout)
|
||||
self.verify = verify
|
||||
self.headers = {
|
||||
"User-Agent": "ara-http-client_%s" % CLIENT_VERSION,
|
||||
@ -80,7 +80,7 @@ class AraHttpClient(object):
|
||||
self.log = logging.getLogger(__name__)
|
||||
self.endpoint = endpoint
|
||||
self.auth = auth
|
||||
self.timeout = timeout
|
||||
self.timeout = int(timeout)
|
||||
self.verify = verify
|
||||
self.client = HttpClient(endpoint=self.endpoint, timeout=self.timeout, auth=self.auth, verify=self.verify)
|
||||
active_client._instance = weakref.ref(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user