From 6154b9e794942bae557516a358e1bc3d665b60db Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 8 Mar 2009 18:46:25 -0400 Subject: Avoid a race condition when making directories This can happen when doing a concurrent build with -jX. --- test/convert.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/convert.py') diff --git a/test/convert.py b/test/convert.py index 276d500f..556a20f5 100755 --- a/test/convert.py +++ b/test/convert.py @@ -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") -- cgit v1.2.3