Merge pull request #1059 from skontrolle/logrm

delete old log after rotation
This commit is contained in:
Simone Margaritelli
2022-07-18 19:59:19 +02:00
committed by GitHub

View File

@ -307,3 +307,5 @@ def do_rotate(filename, stats, cfg):
with open(log_filename, 'rb') as src: with open(log_filename, 'rb') as src:
with gzip.open(archive_filename, 'wb') as dst: with gzip.open(archive_filename, 'wb') as dst:
dst.writelines(src) dst.writelines(src)
os.remove(log_filename)