Skip to content

Commit

Permalink
Fixed len() for filter()
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 26, 2024
1 parent 00f17d0 commit 2ca8afc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contrib/slurm/arrayexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,11 @@ def _execute_run_set(

def filter_previous_results(run_set, benchmark, output_handler):
prefix_base = f"{benchmark.config.output_path}{benchmark.name}."
files = filter(
lambda file: file != benchmark.log_zip,
glob.glob(f"{prefix_base}*.logfiles.zip"),
files = list(
filter(
lambda file: file != benchmark.log_zip,
glob.glob(f"{prefix_base}*.logfiles.zip"),
)
)
if files and len(files) > 0:
prefix = str(max(files, key=os.path.getmtime))[0 : -(len(".logfiles.zip"))]
Expand Down

0 comments on commit 2ca8afc

Please sign in to comment.