From fa66438994f12772d476b51a97d1e35a2d89e55d Mon Sep 17 00:00:00 2001 From: EdmundGoodman Date: Sun, 25 Feb 2024 18:58:47 +0000 Subject: [PATCH] Avoid error deleting non-existent directory --- src/hpc_multibench/test_bench.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hpc_multibench/test_bench.py b/src/hpc_multibench/test_bench.py index 36f0823..7394ac1 100755 --- a/src/hpc_multibench/test_bench.py +++ b/src/hpc_multibench/test_bench.py @@ -148,7 +148,7 @@ def record(self, args: Namespace) -> None: print(f"Recording data from test bench '{self.name}'") # Optionally clobber directory - if not args.no_clobber: + if not args.no_clobber and self.output_directory.exists(): rmtree(self.output_directory) # Realise run configurations from list of instantiations