diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2015-04-08 14:56:30 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2015-04-08 14:56:30 (GMT) |
commit | 7ecfc82edbe5ccb125f53b92447abd4bc155ba1c (patch) | |
tree | b37c62d0be854512af5b840974aad890201b1084 /Lib/multiprocessing | |
parent | 52c0c3382d95a8a4877a5dfaaacf61b436f0b1bf (diff) | |
download | cpython-7ecfc82edbe5ccb125f53b92447abd4bc155ba1c.zip cpython-7ecfc82edbe5ccb125f53b92447abd4bc155ba1c.tar.gz cpython-7ecfc82edbe5ccb125f53b92447abd4bc155ba1c.tar.bz2 |
Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not available.
Patch by Davin Potts.
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r-- | Lib/multiprocessing/queues.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/multiprocessing/queues.py b/Lib/multiprocessing/queues.py index f650771..c91535d 100644 --- a/Lib/multiprocessing/queues.py +++ b/Lib/multiprocessing/queues.py @@ -35,7 +35,8 @@ class Queue(object): def __init__(self, maxsize=0, *, ctx): if maxsize <= 0: - maxsize = _multiprocessing.SemLock.SEM_VALUE_MAX + # Can raise ImportError (see issues #3770 and #23400) + from .synchronize import SEM_VALUE_MAX as maxsize self._maxsize = maxsize self._reader, self._writer = connection.Pipe(duplex=False) self._rlock = ctx.Lock() |