summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2019-03-03 21:10:44 +0100
committerAndreas Grapentin <andreas@grapentin.org>2019-03-03 21:10:44 +0100
commit4f677b5f7e58a96598221a7aab96e603ebaf6f0e (patch)
tree489488636aad327ccd4ab4f7f6046101b07e5d66
parent9e6b9ce6a8d03db0b08e9ba6463383d2e15958d4 (diff)
writing logfiles through lzma
-rw-r--r--parabola_repolint/notify.py3
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)