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/20 13:30:53 UTC
[incubator-ponymail] branch master updated: pylint: id is a
built-in; rename
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 805023b pylint: id is a built-in; rename
805023b is described below
commit 805023b971af673cf1a9973aaf8296cb0075a28a
Author: Sebb <se...@apache.org>
AuthorDate: Sun May 20 14:30:52 2018 +0100
pylint: id is a built-in; rename
---
tools/nullfav.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/nullfav.py b/tools/nullfav.py
index 271a5de..4d0061e 100755
--- a/tools/nullfav.py
+++ b/tools/nullfav.py
@@ -53,19 +53,19 @@ while (scroll_size > 0):
sid = page['_scroll_id']
scroll_size = len(page['hits']['hits'])
for hit in page['hits']['hits']:
- id = hit['_id']
+ mid = hit['_id']
source = hit['_source']
if FAVES in source:
favorites = source[FAVES]
if TARGET in favorites:
newfav = [x for x in favorites if x != TARGET]
if not args.apply:
- print("Would update account id %s" % id)
+ print("Would update account mid %s" % mid)
continue
- print("Updating account id %s" % id)
+ print("Updating account mid %s" % mid)
try:
elastic.update(doc_type='account',
- id = id,
+ id = mid,
body = {
'doc': {
FAVES: newfav
@@ -74,7 +74,7 @@ while (scroll_size > 0):
)
updated +=1
except Exception as e:
- print("Error updating id %s: %s" % (id,e))
+ print("Error updating mid %s: %s" % (mid,e))
failed += 1
if args.apply:
--
To stop receiving notification emails like this one, please contact
sebb@apache.org.