Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix race condition when creating lock directory (#2225)
### Description This PR makes two changes: 1. when `--nolock` is set, it will avoid creating a lock directory 2. when multiple instances of snakemake are running there is a race condition on the `os.mkdir` call. Switching to `os.makedirs` and setting `exist_ok=True` will simply avoid raising an exception in this case. ### QC * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake). --------- Co-authored-by: Johannes Köster <johannes.koester@tu-dortmund.de>
- Loading branch information