ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject incubator-ponymail git commit: Unused imports
Date Mon, 07 Nov 2016 02:41:09 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 28de320f6 -> 65eae05fa


Unused imports

Props to pylint

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/65eae05f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/65eae05f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/65eae05f

Branch: refs/heads/master
Commit: 65eae05fa899379aa6664fa149356738154d1993
Parents: 28de320
Author: Sebb <sebb@apache.org>
Authored: Mon Nov 7 02:41:00 2016 +0000
Committer: Sebb <sebb@apache.org>
Committed: Mon Nov 7 02:41:00 2016 +0000

----------------------------------------------------------------------
 tools/copy-list.py   |  8 +-----
 tools/edit-list.py   |  7 +----
 tools/import-mbox.py |  2 +-
 tools/install.py     |  3 +-
 tools/ll.py          |  5 ++--
 tools/setup.py       | 73 +++++++++++++++++++++++++++++------------------
 6 files changed, 51 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/65eae05f/tools/copy-list.py
----------------------------------------------------------------------
diff --git a/tools/copy-list.py b/tools/copy-list.py
index 656c16a..6ccfd25 100755
--- a/tools/copy-list.py
+++ b/tools/copy-list.py
@@ -24,18 +24,12 @@ This utility can be used to:
 """
 
 import sys
-import random, time
-import os
-from threading import Thread, Lock
+import time
 import configparser
 import argparse
-from os import listdir
-from os.path import isfile, join, isdir
-import json
 
 try:
     from elasticsearch import Elasticsearch, helpers
-    from formatflowed import convertToWrapped
 except:
     print("Sorry, you need to install the elasticsearch and formatflowed modules from pip
first.")
     sys.exit(-1)

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/65eae05f/tools/edit-list.py
----------------------------------------------------------------------
diff --git a/tools/edit-list.py b/tools/edit-list.py
index fec1215..5828028 100755
--- a/tools/edit-list.py
+++ b/tools/edit-list.py
@@ -28,18 +28,13 @@ This utility can be used to:
 """
 
 import sys
-import random, time
-import os
-from threading import Thread, Lock
+import time
 import configparser
 import argparse
-from os import listdir
-from os.path import isfile, join, isdir
 import json
 
 try:
     from elasticsearch import Elasticsearch, helpers
-    from formatflowed import convertToWrapped
 except:
     print("Sorry, you need to install the elasticsearch and formatflowed modules from pip
first.")
     sys.exit(-1)

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/65eae05f/tools/import-mbox.py
----------------------------------------------------------------------
diff --git a/tools/import-mbox.py b/tools/import-mbox.py
index 0a19f62..6014b32 100755
--- a/tools/import-mbox.py
+++ b/tools/import-mbox.py
@@ -402,7 +402,7 @@ if args.dedup:
 if args.ext:
     extension = args.ext[0]
 if args.html2text:
-    import html2text
+    import html2text # needed by archiver
     parseHTML = True
 if args.ibody:
     archiver.iBody = args.ibody[0]

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/65eae05f/tools/install.py
----------------------------------------------------------------------
diff --git a/tools/install.py b/tools/install.py
index c86c6de..a35a1df 100755
--- a/tools/install.py
+++ b/tools/install.py
@@ -14,10 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import sys, os, json, re, time
+import sys
 import getpass
 import subprocess
-import readline
 import platform
 
 dname = platform.linux_distribution()[0].lower()

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/65eae05f/tools/ll.py
----------------------------------------------------------------------
diff --git a/tools/ll.py b/tools/ll.py
index b10e0ed..b9ddb11 100755
--- a/tools/ll.py
+++ b/tools/ll.py
@@ -16,14 +16,13 @@
 # limitations under the License.
 
 import sys
-import random, time
-import os
+import time
 import configparser
 import argparse
 import json
 
 try:
-    from elasticsearch import Elasticsearch, helpers
+    from elasticsearch import Elasticsearch
 except:
     print("Sorry, you need to install the elasticsearch module from pip first.")
     sys.exit(-1)

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/65eae05f/tools/setup.py
----------------------------------------------------------------------
diff --git a/tools/setup.py b/tools/setup.py
index 7b1acf6..1cf9ef2 100755
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -14,10 +14,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import sys, os, json, re, time
+import sys, os
 import getpass
 import subprocess
-import readline
 import argparse
 import shutil
 
@@ -28,8 +27,6 @@ if sys.version_info <= (3, 3):
 dopip = False
 try:
     from elasticsearch import Elasticsearch
-    from formatflowed import convertToWrapped
-    from netaddr import IPNetwork
 except:
     dopip = True
     
@@ -45,8 +42,6 @@ elif dopip:
     try:
         subprocess.check_call(('pip3','install','elasticsearch','formatflowed', 'netaddr'))
         from elasticsearch import Elasticsearch
-        from formatflowed import convertToWrapped
-        from netaddr import IPNetwork
     except:
         print("Oh dear, looks like this failed :(")
         print("Please install elasticsearch and formatflowed before you try again:")
@@ -183,13 +178,16 @@ def createIndex():
             "attachments" : {
               "properties" : {
                 "content_type" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 },
                 "filename" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 },
                 "hash" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 },
                 "size" : {
                   "type" : "long"
@@ -277,20 +275,24 @@ def createIndex():
         "mailinglists" : {
           "properties" : {
             "description" : {
-              "type" : "string"
+              "type" : "string",
+              "index" : "not_analyzed"
             },
             "list" : {
-              "type" : "string"
+              "type" : "string",
+#               "index" : "not_analyzed"
             },
             "name" : {
-              "type" : "string"
+              "type" : "string",
+              "index" : "not_analyzed"
             }
           }
         },
         "account" : {
           "properties" : {
             "cid" : {
-              "type" : "string"
+              "type" : "string",
+              "index" : "not_analyzed"
             },
             "credentials" : {
               "properties" : {
@@ -298,31 +300,38 @@ def createIndex():
                   "type" : "object"
                 },
                 "email" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 },
                 "fullname" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 },
                 "uid" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 }
               }
             },
             "internal" : {
               "properties" : {
                 "cookie" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 },
                 "ip" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 },
                 "oauth_used" : {
-                  "type" : "string"
+                  "type" : "string",
+                  "index" : "not_analyzed"
                 }
               }
             },
             "request_id" : {
-              "type" : "string"
+              "type" : "string",
+              "index" : "not_analyzed"
             }
           }
         },
@@ -337,38 +346,46 @@ def createIndex():
               "type" : "double"
             },
             "from" : {
-              "type" : "string"
+              "type" : "string",
+#               "index" : "not_analyzed"
             },
             "in-reply-to" : {
-              "type" : "string"
+              "type" : "string",
+#               "index" : "not_analyzed"
             },
             "list" : {
-              "type" : "string"
+              "type" : "string",
+#               "index" : "not_analyzed"
             },
             "message-id" : {
               "type" : "string",
               "index" : "not_analyzed"
             },
             "mid" : {
-              "type" : "string"
+              "type" : "string",
+#               "index" : "not_analyzed"
             },
             "private" : {
               "type" : "boolean"
             },
             "recipient" : {
-              "type" : "string"
+              "type" : "string",
+              "index" : "not_analyzed"
             },
             "seen" : {
               "type" : "long"
             },
             "subject" : {
-              "type" : "string"
+              "type" : "string",
+#               "index" : "not_analyzed"
             },
             "to" : {
-              "type" : "string"
+              "type" : "string",
+#               "index" : "not_analyzed"
             },
             "type" : {
-              "type" : "string"
+              "type" : "string",
+              "index" : "not_analyzed"
             }
           }
         }


Mime
View raw message