diff --git a/daily_tests/daily_nightly_tests_report.py b/daily_tests/daily_nightly_tests_report.py index d15baeb..98e37a4 100755 --- a/daily_tests/daily_nightly_tests_report.py +++ b/daily_tests/daily_nightly_tests_report.py @@ -4,6 +4,7 @@ import smtplib import argparse import subprocess +import time from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText @@ -19,6 +20,7 @@ upstream_mails = [ "phracek@redhat.com", "lholmqui@redhat.com", + "cpapasta@redhat.com", "nodeshiftcore@redhat.com", ] @@ -202,10 +204,14 @@ def send_file_to_pastebin(self, log_path, log_name: str): send_paste_bin = os.getenv("HOME") + "/ci-scripts/send_to_paste_bin.sh" cmd = f'{send_paste_bin} "{log_path}" "{log_name}"' print(f"sending logs to pastebin: {cmd}") - try: - run_command(cmd) - except subprocess.CalledProcessError: - pass + for count in range(5): + try: + run_command(cmd) + break + except subprocess.CalledProcessError: + print(f"ERROR: Sending to pastebin by command {cmd} failed") + pass + time.sleep(3) def get_pastebin_url(self, log_name: str) -> str: with open(log_name, "r") as f: