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-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 8f03fab Fix up type error
8f03fab is described below
commit 8f03fabf5e5a570f52550a91ddf15fb7864446b5
Author: Sebb <[email protected]>
AuthorDate: Sat Nov 27 23:18:02 2021 +0000
Fix up type error
---
tools/archiver.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/archiver.py b/tools/archiver.py
index 9c065ca..5211bc7 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -94,12 +94,14 @@ aURL = config.get("archiver", "baseurl")
# Get/Set email parsing policy (primarily ascii/7bit vs native utf8)
# (may be used by import-mbox)
-policy = email.policy.default # Default (8bit) lines in Python >=3.3
policy_choice = config.get("archiver", "policy", fallback="default")
+policy: typing.Any
if policy_choice == "strict":
policy = email.policy.compat32 # 7bit lines
elif policy_choice == "smtputf8":
policy = email.policy.SMTPUTF8 # 8bit/unicode lines
+else:
+ policy = email.policy.default # Default (8bit) lines in Python >=3.3
def encode_base64(buff: bytes) -> str:
""" Convert bytes to base64 as text string (no newlines) """