Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinThomazic committed Nov 12, 2024
1 parent 07750ec commit 64dab98
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .gitlab-ci/scripts/report_tandem.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def main():
def check_provided_args():
if len(sys.argv) != 2 or not os.path.exists(sys.argv[1]):
print("Usage : python report_tandem.py path/to/log/dir", file=sys.stderr)
sys.exit("No valid log directory provided !")
sys.exit("No valid log directory provided!")

if len(list(glob.iglob(sys.argv[1] + "/*.yaml"))) == 0:
sys.exit("No reports in log directory !")
sys.exit("No reports in log directory!")


def add_table_legend(metrics_table, with_logs):
Expand Down Expand Up @@ -89,8 +89,7 @@ def add_test_row(report_file, metrics_table, with_logs):
metrics_table.add_fail(*row)
return 0
except (TypeError, KeyError):
print("Invalid yaml file in log directory ! Is the log directory correct ?")
sys.exit(1)
sys.exit("Invalid yaml file in log directory! Is the log directory correct?")

def report(metrics_table, passed_test_count, total_test_count):
report = report_builder.Report(f'{passed_test_count}/{total_test_count}')
Expand Down

0 comments on commit 64dab98

Please sign in to comment.