Fixes: Report 72/23872/8
authorTibor Frank <tifrank@cisco.com>
Mon, 9 Dec 2019 08:56:32 +0000 (09:56 +0100)
committerTibor Frank <tifrank@cisco.com>
Mon, 9 Dec 2019 09:57:50 +0000 (10:57 +0100)
- show run

Change-Id: Ife9e0faae467b39810c7bf6dec706ca0e09d24be
Signed-off-by: Tibor Frank <tifrank@cisco.com>
resources/tools/presentation/input_data_parser.py

index dac5f19..af8a854 100644 (file)
@@ -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'').

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.