[PATCH 2/2] explicitly define symbols to import instead of 'import *'
Nicolas Sebrecht
nicolas.s-dev at laposte.net
Mon May 9 21:49:30 BST 2011
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev at laposte.net>
---
offlineimap/imaplibutil.py | 4 +---
offlineimap/imapserver.py | 2 +-
offlineimap/mbnames.py | 2 +-
offlineimap/threadutil.py | 2 +-
4 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py
index 5faf036..6c6142c 100644
--- a/offlineimap/imaplibutil.py
+++ b/offlineimap/imaplibutil.py
@@ -24,9 +24,7 @@ import subprocess
from offlineimap.ui import getglobalui
import threading
from offlineimap import OfflineImapError
-from offlineimap.imaplib2 import *
-# Import the symbols we need that aren't exported by default
-from offlineimap.imaplib2 import IMAP4_PORT, IMAP4_SSL_PORT, InternalDate, Mon2num
+from offlineimap.imaplib2 import IMAP4, IMAP4_SSL, zlib, IMAP4_PORT, InternalDate, Mon2num
try:
import ssl
diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py
index 038103c..bfe3796 100644
--- a/offlineimap/imapserver.py
+++ b/offlineimap/imapserver.py
@@ -18,7 +18,7 @@
from offlineimap import imaplibutil, imaputil, threadutil, OfflineImapError
from offlineimap.ui import getglobalui
-from threading import *
+from threading import Lock, BoundedSemaphore
import thread
import time
import hmac
diff --git a/offlineimap/mbnames.py b/offlineimap/mbnames.py
index 5ff0f29..fb8af74 100644
--- a/offlineimap/mbnames.py
+++ b/offlineimap/mbnames.py
@@ -18,7 +18,7 @@
import os.path
import re # for folderfilter
-from threading import *
+from threading import Lock
boxes = {}
config = None
diff --git a/offlineimap/threadutil.py b/offlineimap/threadutil.py
index 7ffcbe6..cef2195 100644
--- a/offlineimap/threadutil.py
+++ b/offlineimap/threadutil.py
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-from threading import *
+from threading import Lock, Thread, BoundedSemaphore
from Queue import Queue, Empty
import traceback
import thread
--
1.7.5.1.354.g761178
More information about the OfflineIMAP-project
mailing list