Skip to content
Snippets Groups Projects
Commit c88e7944 authored by Ashwin Vishnu's avatar Ashwin Vishnu
Browse files

With statement fix

parent f46024cd
No related branches found
No related tags found
No related merge requests found
......@@ -56,4 +56,5 @@
except ImportError:
from multiprocessing.pool import ThreadPool as LegacyPool
# To ensure the with statement works. Required for some older 2.7.x releases
class Pool(LegacyPool):
......@@ -59,4 +60,5 @@
class Pool(LegacyPool):
def __enter__(self, *args):
def __enter__(self):
return self
......@@ -61,6 +63,6 @@
return self
def __exit(self, *args):
def __exit__(self, *args):
self.close()
self.join()
......@@ -64,9 +66,10 @@
self.close()
self.join()
logger.warn("Falling back to multiprocessing.pool.ThreadPool\n"
" pip install futures\n"
"to use concurrent.futures Python 2.7 backport.\n"
logger.warn(
"Falling back to multiprocessing.pool.ThreadPool\n"
" pip install futures\n"
"to use concurrent.futures Python 2.7 backport.\n"
)
PARALLEL_COMPILE = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment