diff options
Diffstat (limited to 'yardstick/common/httpClient.py')
-rw-r--r-- | yardstick/common/httpClient.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yardstick/common/httpClient.py b/yardstick/common/httpClient.py index 54f7be670..5b7831144 100644 --- a/yardstick/common/httpClient.py +++ b/yardstick/common/httpClient.py @@ -26,10 +26,11 @@ class HttpClient(object): while True: try: response = requests.post(url, data=data, headers=headers) + response.raise_for_status() result = response.json() logger.debug('The result is: %s', result) return result - except Exception: + except Exception: # pylint: disable=broad-except if time.time() > t_end: logger.exception('') raise @@ -37,4 +38,5 @@ class HttpClient(object): def get(self, url): response = requests.get(url) + response.raise_for_status() return response.json() |