You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2021/05/26 12:21:18 UTC
[incubator-ponymail] branch master updated: buffering=1 not allowed
with binary files
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail.git
The following commit(s) were added to refs/heads/master by this push:
new 0d0c072 buffering=1 not allowed with binary files
0d0c072 is described below
commit 0d0c0726c5debae95a9b5aac7e04a8cd23e127ea
Author: Sebb <se...@apache.org>
AuthorDate: Wed May 26 13:21:01 2021 +0100
buffering=1 not allowed with binary files
This fixes #534
---
CHANGELOG.md | 1 +
tools/import-mbox.py | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 056904a..f0217e6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
## Changes in 0.12:
+- Bug: buffering=1 not allowed with binary files (#534)
- Bug: Invalid mailing list address supplied (#516)
- Enh: stats.lua could return monthly stats to show in calendar (#532)
- Bug: archiver.py msgbody() function issues (#244 and #463)
diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 28c0363..59f94f8 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -161,7 +161,7 @@ class SlurpThread(Thread):
bmd = bf.read()
bf.close() # explicit early close
bmd = gzip.decompress(bmd)
- tmpfile = tempfile.NamedTemporaryFile(mode='w+b', buffering=1, delete=False)
+ tmpfile = tempfile.NamedTemporaryFile(mode='w+b', delete=False)
tmpfile.write(bmd)
tmpfile.flush()
tmpfile.close()
@@ -514,7 +514,7 @@ if re.match(r"https?://", source):
for mlist in re.finditer(ns, data):
ml = mlist.group(1)
mldata = urlopen("%s%s" % (source, ml)).read()
- tmpfile = tempfile.NamedTemporaryFile(mode='w+b', buffering=1, delete=False)
+ tmpfile = tempfile.NamedTemporaryFile(mode='w+b', delete=False)
try:
if ml.find(".gz") != -1:
mldata = gzip.decompress(mldata)