Skip to content

Commit

Permalink
bug: temp_dir deletion (JelteF#189)
Browse files Browse the repository at this point in the history
* bug: temp_dir deletion

Avoid calling rm_temp_dir() when generate_pdf(..., clean=False)

* Update document.py
  • Loading branch information
jrovira authored and JelteF committed Aug 20, 2017
1 parent 3642fd2 commit 2f6fc24
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pylatex/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,11 @@ def generate_pdf(self, filepath=None, *, clean=True, clean_tex=True,
# Use FileNotFoundError when python 2 is dropped
if e.errno != errno.ENOENT:
raise
rm_temp_dir()

if clean_tex:
os.remove(basename + '.tex') # Remove generated tex file

rm_temp_dir()

# Compilation has finished, so no further compilers have to be
# tried
break
Expand Down

0 comments on commit 2f6fc24

Please sign in to comment.