[Python-checkins] CVS: python/dist/src/Lib Queue.py,1.11,1.12
Tim Peters
tim_one@users.sourceforge.net
Mon, 15 Jan 2001 14:53:48 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv4697/python/dist/src/lib
Modified Files:
Queue.py
Log Message:
Variant of Skip's patch 103246 (Remove unneeded string exception compat from Queue).
Index: Queue.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/Queue.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** Queue.py 2000/06/28 14:48:01 1.11
--- Queue.py 2001/01/15 22:53:46 1.12
***************
*** 1,17 ****
"""A multi-producer, multi-consumer queue."""
! # define this exception to be compatible with Python 1.5's class
! # exceptions, but also when -X option is used.
! try:
! class Empty(Exception):
! pass
! class Full(Exception):
! pass
! except TypeError:
! # string based exceptions
! # exception raised by get(block=0)/get_nowait()
! Empty = 'Queue.Empty'
! # exception raised by put(block=0)/put_nowait()
! Full = 'Queue.Full'
class Queue:
--- 1,11 ----
"""A multi-producer, multi-consumer queue."""
! class Empty(Exception):
! "Exception raised by Queue.get(block=0)/get_nowait()."
! pass
!
! class Full(Exception):
! "Exception raised by Queue.put(block=0)/put_nowait()."
! pass
class Queue: