lockfiles : creates directory for locks if not already present
This commit is contained in:
parent
a3fc492d45
commit
f47dcdc47a
@ -155,6 +155,8 @@ def __init__(
|
|||||||
if lock:
|
if lock:
|
||||||
self._lock_file = join_path(spack.stage_path, self.name + '.lock')
|
self._lock_file = join_path(spack.stage_path, self.name + '.lock')
|
||||||
if not os.path.exists(self._lock_file):
|
if not os.path.exists(self._lock_file):
|
||||||
|
directory, _ = os.path.split(self._lock_file)
|
||||||
|
mkdirp(directory)
|
||||||
touch(self._lock_file)
|
touch(self._lock_file)
|
||||||
self._lock = llnl.util.lock.Lock(self._lock_file)
|
self._lock = llnl.util.lock.Lock(self._lock_file)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user