mirror of
https://github.com/andrewferrier/email2pdf.git
synced 2025-03-16 21:23:37 +00:00
Add explanatory comments for why file is being closed.
This commit is contained in:
parent
9be1da4c2b
commit
6d17757432
1 changed files with 2 additions and 0 deletions
|
@ -531,6 +531,8 @@ def add_update_pdf_metadata(filename, update_dictionary):
|
|||
info_dict.update({NameObject(key): createStringObject(full_update_dictionary[key])})
|
||||
|
||||
os_file_out, temp_file_name = tempfile.mkstemp(prefix="email2pdf_add_update_pdf_metadata", suffix=".pdf")
|
||||
# Immediately close the file as created to work around issue on
|
||||
# Windows where file cannot be opened twice.
|
||||
os.close(os_file_out)
|
||||
|
||||
with open(temp_file_name, 'wb') as file_out:
|
||||
|
|
Loading…
Reference in a new issue