diff options
author | Tibor Frank <tifrank@cisco.com> | 2019-12-09 09:56:32 +0100 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2019-12-09 10:57:50 +0100 |
commit | c0e53d575541d37bcd29b1c5a8f822a0204949c3 (patch) | |
tree | 989d1542a113c608efa2b60c61839c4a23cc4762 /resources/tools | |
parent | 1ae2fdf1c6bb14fc3db34cba00271916a1d7c527 (diff) |
Fixes: Report
- show run
Change-Id: Ife9e0faae467b39810c7bf6dec706ca0e09d24be
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools')
-rw-r--r-- | resources/tools/presentation/input_data_parser.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/resources/tools/presentation/input_data_parser.py b/resources/tools/presentation/input_data_parser.py index dac5f19e69..af8a854ce9 100644 --- a/resources/tools/presentation/input_data_parser.py +++ b/resources/tools/presentation/input_data_parser.py @@ -442,15 +442,22 @@ class ExecutionChecker(ResultVisitor): :type msg: Message :returns: Nothing. """ + if u"show-run" not in self._data[u"tests"][self._test_id].keys(): self._data[u"tests"][self._test_id][u"show-run"] = str() if msg.message.count(u"stats runtime") or \ msg.message.count(u"Runtime"): - host = str(re.search(self.REGEX_TC_PAPI_CLI, msg.message). - group(1)) - socket = str(re.search(self.REGEX_TC_PAPI_CLI, msg.message). - group(2)) + try: + host = str(re.search(self.REGEX_TC_PAPI_CLI, msg.message). + group(1)) + except (AttributeError, IndexError): + host = u"" + try: + socket = str(re.search(self.REGEX_TC_PAPI_CLI, msg.message). + group(2)) + except (AttributeError, IndexError): + socket = u"" runtime = loads( str(msg.message). replace(u' ', u''). |