Skip to content

Commit

Permalink
Shutdown driver instead of just closing the browser window
Browse files Browse the repository at this point in the history
This will prevent zombie processes.
  • Loading branch information
wm3ndez committed Nov 28, 2023
1 parent fc6759a commit 7757933
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html_to_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def to_pdf(html: str) -> bytes:
logger.error(e)
return b""
finally:
driver.close()
driver.quit()

return base64.b64decode(pdf["data"])

Expand Down

0 comments on commit 7757933

Please sign in to comment.