c_client: Fix parallel-make issue creating 'man' directory
With make -j, it was possible to hit a race condition in the code to make the 'man' directory. Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
5f8f2ba1c4
commit
c3deeaf714
|
@ -5,6 +5,7 @@ from functools import reduce
|
||||||
import getopt
|
import getopt
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import errno
|
||||||
import time
|
import time
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -2902,8 +2903,11 @@ Refer to the README file in xcb/proto for more info.
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# Ensure the man subdirectory exists
|
# Ensure the man subdirectory exists
|
||||||
if not os.path.exists('man'):
|
try:
|
||||||
os.mkdir('man')
|
os.mkdir('man')
|
||||||
|
except OSError, e:
|
||||||
|
if e.errno != errno.EEXIST:
|
||||||
|
raise
|
||||||
|
|
||||||
today = time.strftime('%Y-%m-%d', time.gmtime(os.path.getmtime(args[0])))
|
today = time.strftime('%Y-%m-%d', time.gmtime(os.path.getmtime(args[0])))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue