bpo-37394: Fix pure Python implementation of the queue module (GH-14351)

This commit is contained in:
Pablo Galindo 2019-06-25 02:53:30 +01:00 committed by GitHub
parent b51b7137fa
commit 3f5b9088b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 109 additions and 49 deletions

View file

@ -14,7 +14,7 @@ __all__ = ['Empty', 'Full', 'Queue', 'PriorityQueue', 'LifoQueue', 'SimpleQueue'
try:
from _queue import Empty
except AttributeError:
except ImportError:
class Empty(Exception):
'Exception raised by Queue.get(block=0)/get_nowait().'
pass