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 88a4bac Minor tweaks suggested by PyLint
88a4bac is described below
commit 88a4bac5eb077e068719c4329015fb8a29daab7d
Author: Sebb <[email protected]>
AuthorDate: Fri May 14 15:44:09 2021 +0100
Minor tweaks suggested by PyLint
---
tools/archiver.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/archiver.py b/tools/archiver.py
index c0a6aba..18b7be3 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -118,7 +118,7 @@ def parse_attachment(
# In such cases, the get() method returns a Header not a string
dispositions = str(cd).strip().split(";")
cdtype = dispositions[0].lower()
- if cdtype == "attachment" or cdtype == "inline":
+ if cdtype in ("attachment", "inline"):
fd = part.get_payload(decode=True)
# Allow for empty string
if fd is None:
@@ -915,7 +915,7 @@ def main():
if args.verbose:
traceback.print_exc()
print("Archiving failed!: %s" % err)
- raise Exception("Archiving to ES failed")
+ raise Exception("Archiving to ES failed") from err
else:
print("Nothing to import (no list-id found!)")
except Exception as err: