Skip to content

Commit

Permalink
fix: remove temporary files
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbrignon committed Jun 23, 2024
1 parent 897366f commit 0b283ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mkdocs_exporter/formats/pdf/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ async def print(self, html: str) -> tuple[bytes, int]:
pages = int(await context.locator('body').get_attribute('mkdocs-exporter-pages') or 0)
pdf = await context.pdf(prefer_css_page_size=True, print_background=True, display_header_footer=False)

os.unlink(file)

await context.close()

os.unlink(file.name)

return (pdf, pages)


Expand Down

0 comments on commit 0b283ba

Please sign in to comment.