Skip to content

Commit

Permalink
yapf
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Stitt <justinstitt@google.com>
  • Loading branch information
JustinStitt committed Mar 19, 2024
1 parent 3ac7693 commit 720a22f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions caching/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,19 @@ def main():
build_log_raw = response.read().decode()

failed_pattern = (
r"(?<=Apply patch set FAILED\s)[0-9A-Za-z._:/\-\s]*?(?=\serror: )"
)
r"(?<=Apply patch set FAILED\s)[0-9A-Za-z._:/\-\s]*?(?=\serror: )")
failed_matches = re.findall(failed_pattern, build_log_raw)
if len(failed_matches) == 0:
print(
f"No patches failed to apply yet the build status stated there were: {build['status_message']}"
)
sys.exit(0) # Not sure how we got here but continue the action anyways
sys.exit(
0) # Not sure how we got here but continue the action anyways

patches_that_failed_to_apply = failed_matches[0].split('\n')
print(f"Error: Some patches failed to apply.\n{patches_that_failed_to_apply}\n")
print(
f"Error: Some patches failed to apply.\n{patches_that_failed_to_apply}\n"
)
sys.exit(1)

if len(builds_that_are_missing_metadata) == len(builds):
Expand Down

0 comments on commit 720a22f

Please sign in to comment.