fontbuild: fix issue where building in parallel could cause some builds to fail because of a file system race condition
This commit is contained in:
parent
561b61c320
commit
98ca6bb9f0
1 changed files with 5 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ from common import BASEDIR, VENVDIR, getGitHash, getVersion
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import datetime
|
import datetime
|
||||||
|
import errno
|
||||||
import glyphsLib
|
import glyphsLib
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
|
|
@ -38,8 +39,11 @@ def sighandler(signum, frame):
|
||||||
|
|
||||||
|
|
||||||
def mkdirs(path):
|
def mkdirs(path):
|
||||||
if not os.access(path, os.F_OK):
|
try:
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
|
except OSError as e:
|
||||||
|
if e.errno != errno.EEXIST:
|
||||||
|
raise # raises the error again
|
||||||
|
|
||||||
|
|
||||||
def fatal(msg):
|
def fatal(msg):
|
||||||
|
|
|
||||||
Reference in a new issue