From c65e42b8b673164593a2d0ba68269a516ae1ca9f Mon Sep 17 00:00:00 2001 From: agronholm Date: Sun, 19 Dec 2010 05:35:48 +0200 Subject: Fixed ImportError in py3k --- apscheduler/threadpool.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apscheduler') diff --git a/apscheduler/threadpool.py b/apscheduler/threadpool.py index 49df439..fea5bd7 100644 --- a/apscheduler/threadpool.py +++ b/apscheduler/threadpool.py @@ -4,12 +4,16 @@ Please note that this ThreadPool does *not* fully implement the PEP 3148 ThreadPool! """ -from Queue import Queue, Empty from threading import Thread, Lock, currentThread from weakref import ref import logging import atexit +try: + from queue import Queue, Empty +except ImportError: + from Queue import Queue, Empty + logger = logging.getLogger(__name__) _threadpools = set() -- cgit v1.2.1