From d0ed54bb446eeceeff179476ea84ed0bdfaecd3f Mon Sep 17 00:00:00 2001 From: Xiaoyun Liu Date: Tue, 9 Jul 2024 12:27:11 +0200 Subject: [PATCH] Revert local access --- scripts/generate_report.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/generate_report.py b/scripts/generate_report.py index da7a647..7b900fc 100755 --- a/scripts/generate_report.py +++ b/scripts/generate_report.py @@ -4,7 +4,6 @@ from pathlib import Path from tempfile import NamedTemporaryFile as NTF from typing import Optional -import pdfkit from jinja2 import Environment, FileSystemLoader @@ -57,8 +56,6 @@ def __init__(self, summaryd: dict, "header-spacing": "5", "footer-spacing": "4", - "enable-local-file-access": True, - "load-error-handling": "ignore", } if header_line: pdfkit_opts["header-line"] = "" @@ -190,6 +187,7 @@ def write(self, html, pdf) -> None: fout.write(cov_txt) fout.write(con_txt) if pdf: + import pdfkit pdfkit.from_string(con_txt, pdf, options=self.pdfkit_opts, css=self.css_fname, toc=toc, cover=cov_fh.name, cover_first=True)