فهرست منبع

fix python exceptions raised when a test case fails (#17559)

Signed-off-by: Karl Haubenwallner <[email protected]>
Karl Haubenwallner 1 سال پیش
والد
کامیت
3f94f92021

+ 6 - 1
Tools/LyTestTools/ly_test_tools/cli/codeowners_hint.py

@@ -26,7 +26,12 @@ def get_codeowners(target_path: pathlib.PurePath) -> (str|None, str|None, pathli
     :return: tuple of (matched_path_entry, matched_owner_aliases, found_codeowners_path) which are empty when missing
     """
     codeowners_path = find_github_codeowners(target_path)
-    matched_path, owner_aliases = get_codeowners_from(target_path, codeowners_path)
+    if codeowners_path:
+        matched_path, owner_aliases = get_codeowners_from(target_path, codeowners_path)
+    else:
+        matched_path = ""
+        owner_aliases = ""
+        codeowners_path = ""
     return matched_path, owner_aliases, codeowners_path
 
 

+ 2 - 2
Tools/LyTestTools/ly_test_tools/o3de/asset_processor.py

@@ -544,13 +544,13 @@ class AssetProcessor(object):
                     return False, None
             return True, None
         except BaseException as be:  # purposefully broad
-            logger.exception("Exception while starting Asset Processor", be)
+            logger.exception("Exception while starting Asset Processor")
             # clean up to avoid leaking open AP process to future tests
             try:
                 if self._ap_proc:
                     self._ap_proc.kill()
             except Exception as ex:
-                logger.exception("Ignoring exception while trying to terminate Asset Processor from LyTestTools ", ex)
+                logger.exception("Ignoring exception while trying to terminate Asset Processor from LyTestTools")
             raise exceptions.LyTestToolsFrameworkException from be  # raise whatever prompted us to clean up
 
     def connect_listen(self, timeout=DEFAULT_TIMEOUT_SECONDS):