diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2019-03-03 21:10:44 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2019-03-03 21:10:44 +0100 |
commit | 4f677b5f7e58a96598221a7aab96e603ebaf6f0e (patch) | |
tree | 489488636aad327ccd4ab4f7f6046101b07e5d66 | |
parent | 9e6b9ce6a8d03db0b08e9ba6463383d2e15958d4 (diff) |
writing logfiles through lzma
-rw-r--r-- | parabola_repolint/notify.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/parabola_repolint/notify.py b/parabola_repolint/notify.py index d330050..7c122cb 100644 --- a/parabola_repolint/notify.py +++ b/parabola_repolint/notify.py @@ -4,6 +4,7 @@ repolint results publishing helpers import os import time +import lzma import tempfile import smtplib @@ -92,5 +93,5 @@ def write_log(filename, contents): dst = os.path.expanduser(CONFIG.notify.logfile_dest) os.makedirs(dst, exist_ok=True) - with open(os.path.join(dst, filename), 'w') as logfile: + with lzma.open(os.path.join(dst, filename) + '.xz', 'wt') as logfile: logfile.write(contents) |