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 2018/05/21 01:08:09 UTC

[incubator-ponymail] branch master updated: pylint: don't redefine built-ins

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 3cfaa86  pylint: don't redefine built-ins
3cfaa86 is described below

commit 3cfaa86ba211eefbfbb9e606f24c3ba522297cb3
Author: Sebb <se...@apache.org>
AuthorDate: Mon May 21 02:08:08 2018 +0100

    pylint: don't redefine built-ins
---
 tools/archiver.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/archiver.py b/tools/archiver.py
index 2201ebf..03f13e4 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -84,9 +84,9 @@ if config.has_option('elasticsearch', 'user'):
 
 archiver_generator = config.get("archiver", "generator", fallback="medium")
 
-def encode_base64(bytes):
+def encode_base64(buff):
     """ Convert bytes to base64 as text string (no newlines) """
-    return standard_b64encode(bytes).decode('ascii', 'ignore')
+    return standard_b64encode(buff).decode('ascii', 'ignore')
 
 def parse_attachment(part):
     cd = part.get("Content-Disposition", None)
@@ -402,8 +402,8 @@ class Archiver(object): # N.B. Also used by import-mbox.py
 
         ojson, contents = self.compute_updates(lid, private, msg)
         if not ojson:
-            id = msg.get('message-id') or msg.get('Subject') or msg.get("Date")
-            raise Exception("Could not parse message %s for %s" % (id,lid))
+            _id = msg.get('message-id') or msg.get('Subject') or msg.get("Date")
+            raise Exception("Could not parse message %s for %s" % (_id,lid))
 
         if args.dry:
             print("**** Dry run, not saving message to database *****")

-- 
To stop receiving notification emails like this one, please contact
sebb@apache.org.