summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2020-01-28 12:49:26 -0800
committerGitHub <noreply@github.com>2020-01-28 12:49:26 -0800
commit52ab2421bb5aeba38ec47bbb88b75d21d8793387 (patch)
treec2431cd3612897d33ba081c173dfc09452733b84 /lib
parent67c6d99219f5a49c68baf9020880410ded85413a (diff)
downloadspack-52ab2421bb5aeba38ec47bbb88b75d21d8793387.tar.gz
spack-52ab2421bb5aeba38ec47bbb88b75d21d8793387.tar.bz2
spack-52ab2421bb5aeba38ec47bbb88b75d21d8793387.tar.xz
spack-52ab2421bb5aeba38ec47bbb88b75d21d8793387.zip
Fix handling of filter_file exceptions (#14651)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/llnl/util/filesystem.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index d525884ee9..273840a424 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -201,7 +201,6 @@ def filter_file(regex, repl, *filenames, **kwargs):
output_file.writelines(input_file.readlines())
except BaseException:
- os.remove(tmp_filename)
# clean up the original file on failure.
shutil.move(backup_filename, filename)
raise