python3: Queue -> queue

import queue (python3) if Queue is not available (python2)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-02-05 11:55:26 +01:00
parent c5468ae599
commit 06a78b6112
2 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2002-2011 John Goerzen & contributors
# Copyright (C) 2002-2012 John Goerzen & contributors
# Thread support module
#
# This program is free software; you can redistribute it and/or modify
@ -16,7 +16,10 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
from threading import Lock, Thread, BoundedSemaphore
try:
from Queue import Queue, Empty
except ImportError: # python3
from queue import Queue, Empty
import traceback
from thread import get_ident # python < 2.6 support
import os.path

View File

@ -22,7 +22,10 @@ import sys
import os
import traceback
import threading
try:
from Queue import Queue
except ImportError: #python3
from queue import Queue
from collections import deque
from offlineimap.error import OfflineImapError
import offlineimap