summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-08-13 15:32:31 -0400
committerJulien Danjou <julien@danjou.info>2012-08-14 13:33:01 +0200
commitc3deeaf714630531d693a6a902b8dabf791858b1 (patch)
tree1d825a87805a49189648bb9d1a203f0bbd1e1e9f
parent5f8f2ba1c4f9ac74c8f301dcca8566e296e37995 (diff)
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>
-rw-r--r--src/c_client.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/c_client.py b/src/c_client.py
index d006d30..31ed3b5 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -5,6 +5,7 @@ from functools import reduce
import getopt
import os
import sys
+import errno
import time
import re
@@ -2902,8 +2903,11 @@ Refer to the README file in xcb/proto for more info.
raise
# Ensure the man subdirectory exists
-if not os.path.exists('man'):
+try:
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])))