This commit is contained in:
Alexey Milovidov 2024-02-09 00:46:12 +01:00
parent f386e34b91
commit ad665f9b06

View File

@ -112,10 +112,10 @@ def get_build_name_for_check(check_name: str) -> str:
def read_build_urls(build_name: str, reports_path: Union[Path, str]) -> List[str]:
for root, _, files in os.walk(reports_path):
for f in files:
if f.endswith(f"_{build_name}.json"):
logging.info("Found build report json %s", f)
with open(os.path.join(root, f), "r", encoding="utf-8") as file_handler:
for file in files:
if file.endswith(f"_{build_name}.json"):
logging.info("Found build report json %s", file)
with open(os.path.join(root, file), "r", encoding="utf-8") as file_handler:
build_report = json.load(file_handler)
return build_report["build_urls"] # type: ignore
return []