summaryrefslogtreecommitdiffstats
path: root/utils/functest_utils.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2016-08-17 15:26:35 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2016-08-17 15:29:07 +0200
commit81386dfaa72b4c8793c7ce663fcd50e9ead2fe9d (patch)
treee6077cdbe7c113f31bd79a8dd8e7c82eefb0179d /utils/functest_utils.py
parent7f44a270739fe60f3bc22cae287bce88be83f304 (diff)
Check the response status code
Now an HTTPError exception is raised in case of a 4XX or 5XX error response. Change-Id: Idd91c1d2b2a1b81a1cf7d075527cb302099cdb4e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'utils/functest_utils.py')
-rw-r--r--utils/functest_utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/functest_utils.py b/utils/functest_utils.py
index 3dd93fd28..862b53390 100644
--- a/utils/functest_utils.py
+++ b/utils/functest_utils.py
@@ -219,6 +219,7 @@ def push_results_to_db(project, case_name, logger,
r = requests.post(url, data=json.dumps(params), headers=headers)
if logger:
logger.debug(r)
+ r.raise_for_status()
return True
except Exception, e:
print("Error [push_results_to_db('%s', '%s', '%s', " +