From 34dcbc821111b5e0227a76d8aa820e7daafffe10 Mon Sep 17 00:00:00 2001 From: Zach Reichert Date: Mon, 17 Dec 2018 12:34:47 -0800 Subject: [PATCH] MAINT refactor automation_content param for _ZigZagTestLogTempest - uses the new parameter test_execution_parameters --- zigzag/zigzag_test_log.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zigzag/zigzag_test_log.py b/zigzag/zigzag_test_log.py index 83edacf..78fcd1b 100644 --- a/zigzag/zigzag_test_log.py +++ b/zigzag/zigzag_test_log.py @@ -930,9 +930,10 @@ def automation_content(self): """ if self._automation_content is None: try: - self._automation_content = _ZigZagTestLogTempest._TEMPEST_UUID_RGX.search( - self._testcase_xml.attrib['name']).group(0) - except AttributeError: + automation_content = list(filter(_ZigZagTestLogTempest._TEMPEST_UUID_RGX.search, + self.test_execution_parameters))[0] + self._automation_content = _ZigZagTestLogTempest._TEMPEST_UUID_RGX.search(automation_content).group(0) + except IndexError: # happens when we filter to an empty list raise ZigZagTestLogError('OHH snap there is no UUID!!!') return self._automation_content