handle Queue renaming

--HG--
branch : trunk
This commit is contained in:
Benjamin Peterson 2009-08-29 15:10:40 -05:00
parent 7a4bd92e33
commit b3e8b2f6ab
1 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,8 @@
import threading, weakref, sys
import Queue
try:
import Queue as queue
except ImportError:
import queue
if 'Message' not in globals():
from py.__.execnet.message import Message
@ -30,7 +33,7 @@ class Channel(object):
assert isinstance(id, int)
self.gateway = gateway
self.id = id
self._items = Queue.Queue()
self._items = queue.Queue()
self._closed = False
self._receiveclosed = threading.Event()
self._remoteerrors = []
@ -48,7 +51,7 @@ class Channel(object):
while 1:
try:
olditem = queue.get(block=False)
except Queue.Empty:
except queue.Empty:
break
else:
if olditem is ENDMARKER: