diff options
author | Keuin <[email protected]> | 2023-06-03 15:26:31 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-06-03 15:27:21 +0800 |
commit | ce55c5a37169fa2b3e17b53db8bcfe040aaa5cf0 (patch) | |
tree | bc00ee2830843eba8e70c2cdd9b19730bd4ce08b | |
parent | 1467767c8e26f2fe5d318114c8e0055be1c10c8e (diff) |
Remove temporary files when done
-rw-r--r-- | texgen.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -13,8 +13,7 @@ def temp_dir(path: str): try: yield path finally: - # shutil.rmtree(path) - pass + shutil.rmtree(path) class TexGenerationError(Exception): @@ -62,6 +61,5 @@ class TexGenerator: print('STDERR', stderr) if proc.returncode != 0: raise TexGenerationError(f'xelatex process exited with non-zero code {proc.returncode}') - - os.rename(os.path.join(workdir, f'{job_name}.pdf'), cache_file_path) + os.rename(os.path.join(workdir, f'{job_name}.pdf'), cache_file_path) return cache_file_path |