diff options
Diffstat (limited to 'tools/tempfiles.py')
-rw-r--r-- | tools/tempfiles.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/tempfiles.py b/tools/tempfiles.py index 06c4d1dd..1721b2bb 100644 --- a/tools/tempfiles.py +++ b/tools/tempfiles.py @@ -6,7 +6,8 @@ def try_delete(filename): try: os.unlink(filename) except: - shutil.rmtree(filename, ignore_errors=True) + if os.path.exists(filename): + shutil.rmtree(filename, ignore_errors=True) class TempFiles: def __init__(self, tmp, save_debug_files=False): |