Fix handling of filter_file exceptions (#14651)

This commit is contained in:
Greg Becker 2020-01-28 12:49:26 -08:00 committed by GitHub
parent 67c6d99219
commit 52ab2421bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -201,7 +201,6 @@ def groupid_to_group(x):
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