From 089e5b6eedaaf6fca726c9df7e0ff463fec59679 Mon Sep 17 00:00:00 2001 From: Vincenth Brennsteiner Date: Tue, 12 Nov 2024 14:35:26 +0100 Subject: [PATCH] minor refactoring --- misc/distributed_search/parse_parameters.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/distributed_search/parse_parameters.py b/misc/distributed_search/parse_parameters.py index e0dfa395..5d8d9e11 100755 --- a/misc/distributed_search/parse_parameters.py +++ b/misc/distributed_search/parse_parameters.py @@ -67,8 +67,7 @@ # create folder for current chunk in target directory. Don't create the folder if it already exists. chunk_folder = os.path.join(args.target_directory, "chunk_" + str(i)) - if not os.path.exists(chunk_folder): - os.makedirs(chunk_folder) + os.makedirs(chunk_folder, exist_ok=True) # retrieve library path from config or arguments and copy to chunk folder, set new library path in config if os.path.exists(args.library_path) and os.path.basename(args.library_path).endswith('.hdf'):