Skip to content

Commit

Permalink
fix for edge-case
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed Mar 3, 2024
1 parent f9ce17c commit 3cd474a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ansibleguy-webui/aw/execute/play_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,12 @@ def runner_cleanup(execution: JobExecution, path_run: Path, exec_repo: ExecuteRe
# clean empty log files
for log_file in JobExecution.log_file_fields:
log_file_path = getattr(execution, log_file)
if os_stat(log_file_path).st_size == 0:
remove_file(log_file_path)
try:
if os_stat(log_file_path).st_size == 0:
remove_file(log_file_path)

except (FileNotFoundError, TypeError):
pass

rmtree(path_run, ignore_errors=True)

Expand Down

0 comments on commit 3cd474a

Please sign in to comment.