aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2019-03-15 12:44:44 +0100
committerPeter Mikus <pmikus@cisco.com>2019-03-18 06:35:19 +0000
commit6aaecf9f7fe3f0ad0d9bbad20e4853472d3e72df (patch)
tree9c5fc5073c20b7554623cd55c386ac7056af8607
parent6ed351a58a7452d6bd99a049cc45610345b7c75b (diff)
PAPI Executor: Add more desciptive error message
- Add more desciptive error message to the processing of replies. Change-Id: Ie43651370d5754aedf2515438c02ff4aa21bdc46 Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r--resources/libraries/python/PapiExecutor.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/resources/libraries/python/PapiExecutor.py b/resources/libraries/python/PapiExecutor.py
index b0ddccfbde..c103c40d9a 100644
--- a/resources/libraries/python/PapiExecutor.py
+++ b/resources/libraries/python/PapiExecutor.py
@@ -293,7 +293,12 @@ class PapiExecutor(object):
papi_reply = list()
if process_reply:
- json_data = json.loads(stdout)
+ try:
+ json_data = json.loads(stdout)
+ except ValueError:
+ logger.error("An error occured while processing the PAPI "
+ "request:\n{rqst}".format(rqst=local_list))
+ raise
for data in json_data:
try:
api_reply_processed = dict(