Commit 1ae3b09c authored by Sjoerd Simons's avatar Sjoerd Simons Committed by Emanuele Aina

Fix parallel pdf builds

First testing if a directory exists and then creating it is inherently
racy. Instead always try to create the directory and ignore the error if
it already existed.

Fixes build failures when doing parallel pdf builds
Signed-off-by: Sjoerd Simons's avatarSjoerd Simons <sjoerd.simons@collabora.co.uk>
parent b63b368d
......@@ -18,6 +18,7 @@
# along with this library. If not, see <http://www.gnu.org/licenses/>.
from lxml import etree
import errno
import lxml.html
import io
import os
......@@ -137,8 +138,11 @@ def write(args, output):
os.write(tmp_html, u'\n'.join(output))
folder = os.path.dirname(args.output)
if not os.path.exists(folder):
try:
os.makedirs(folder)
except OSError, e:
if e.errno != errno.EEXIST:
raise e
cmd = ['/usr/bin/pandoc', tmp_path, '-V documentclass=article',
'--variable', 'links-as-notes=true',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment