Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aee6cf7

Browse files
committed
do not presume the file needs to be closed (it may be a StringIO which is useless once closed). the framework user must decide when to close the file.
1 parent 36b3453 commit aee6cf7

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

xhtml2pdf/document.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ def _page_counter(page_no):
215215
# passed from the caller
216216
data = out.getvalue()
217217
c.dest.write(data)
218-
c.dest.close()
219-
220218
except: # TODO: Kill catch-all!
221219
# log.exception(c.error("Document error"))
222220
log.exception("Document error")

0 commit comments

Comments
 (0)