From a63da19b70de4c19ff03578f35f8460327529af3 Mon Sep 17 00:00:00 2001 From: mDuo13 Date: Wed, 24 Feb 2016 18:50:51 -0800 Subject: [PATCH] parse_pages - create out path if it doesn't exist when pdf-ing (cherry picked from commit c6b80164933ce18a36edba3c277508356978c9a7) --- tool/parse_pages.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tool/parse_pages.py b/tool/parse_pages.py index 341105c7c8..ae56e5dd63 100755 --- a/tool/parse_pages.py +++ b/tool/parse_pages.py @@ -424,6 +424,11 @@ def make_pdf(outfile, target=None): # Prince will need the static files, so copy them over copy_static_files(out_path=temp_files_path) + # Make sure the path we're going to write the PDF to exists + if not os.path.isdir(config["out_path"]): + logging.info("creating build folder %s" % config["out_path"]) + os.makedirs(config["out_path"]) + # Start preparing the prince command args = [config["prince_executable"], '-o', outfile] # Each HTML output file in the target is another arg to prince