parse_pages - create out path if it doesn't exist when pdf-ing

(cherry picked from commit c6b80164933ce18a36edba3c277508356978c9a7)
This commit is contained in:
mDuo13
2016-02-24 18:50:51 -08:00
parent 25e4b4e475
commit a63da19b70

View File

@@ -424,6 +424,11 @@ def make_pdf(outfile, target=None):
# Prince will need the static files, so copy them over # Prince will need the static files, so copy them over
copy_static_files(out_path=temp_files_path) 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 # Start preparing the prince command
args = [config["prince_executable"], '-o', outfile] args = [config["prince_executable"], '-o', outfile]
# Each HTML output file in the target is another arg to prince # Each HTML output file in the target is another arg to prince