Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 97d0292

Browse files
Handle the case where interpreters.queues doesn't exist.
1 parent f150931 commit 97d0292

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/concurrent/futures/interpreter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ def run(self, task):
182182
obj = _interpqueues.get(self.resultsid)
183183
except _interpqueues.QueueNotFoundError:
184184
raise # re-raise
185-
# XXX This breaks if test.support.interpreters.queues
186-
# doesn't exist.
187185
except _interpqueues.QueueError:
188186
continue
187+
except ModuleNotFoundError:
188+
# interpreters.queues doesn't exist, which means
189+
# QueueEmpty doesn't. Act as though it does.
190+
continue
189191
else:
190192
break
191193
(res, excdata), pickled, unboundop = obj

0 commit comments

Comments
 (0)