Avoid a race condition when making directories
This can happen when doing a concurrent build with -jX.
This commit is contained in:
parent
7b2d75904c
commit
6154b9e794
1 changed files with 2 additions and 1 deletions
|
|
@ -42,7 +42,8 @@ target = os.path.abspath(sys.argv[2])
|
|||
|
||||
dirname = os.path.dirname(target)
|
||||
if not os.path.isdir(dirname):
|
||||
os.makedirs(dirname)
|
||||
try: os.makedirs(dirname)
|
||||
except: pass
|
||||
|
||||
fd = open(source, "r")
|
||||
fo = open(target, "w")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue