summaryrefslogtreecommitdiffstats
path: root/Lib/concurrent
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2011-11-11 19:05:50 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2011-11-11 19:05:50 (GMT)
commit04842a84c31d82d9c2255e6575344412c58e518e (patch)
tree9f4627fbf8715735104187c417d1c5e2f7f6ebc5 /Lib/concurrent
parentf8240d6564c6d8f166256fca9b0fb6e9b89c7db1 (diff)
downloadcpython-04842a84c31d82d9c2255e6575344412c58e518e.zip
cpython-04842a84c31d82d9c2255e6575344412c58e518e.tar.gz
cpython-04842a84c31d82d9c2255e6575344412c58e518e.tar.bz2
Remove unused or redundant imports in concurrent.futures and multiprocessing.
Diffstat (limited to 'Lib/concurrent')
-rw-r--r--Lib/concurrent/futures/_base.py1
-rw-r--r--Lib/concurrent/futures/process.py3
-rw-r--r--Lib/concurrent/futures/thread.py2
3 files changed, 2 insertions, 4 deletions
diff --git a/Lib/concurrent/futures/_base.py b/Lib/concurrent/futures/_base.py
index 6cfded3..3b097b5 100644
--- a/Lib/concurrent/futures/_base.py
+++ b/Lib/concurrent/futures/_base.py
@@ -4,7 +4,6 @@
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
import collections
-import functools
import logging
import threading
import time
diff --git a/Lib/concurrent/futures/process.py b/Lib/concurrent/futures/process.py
index 9b2e0f3..0575146 100644
--- a/Lib/concurrent/futures/process.py
+++ b/Lib/concurrent/futures/process.py
@@ -221,7 +221,7 @@ def _queue_management_worker(executor_reference,
assert sentinels
try:
result_item = result_queue.get(sentinels=sentinels)
- except SentinelReady as e:
+ except SentinelReady:
# Mark the process pool broken so that submits fail right now.
executor = executor_reference()
if executor is not None:
@@ -291,7 +291,6 @@ def _check_system_limits():
raise NotImplementedError(_system_limited)
_system_limits_checked = True
try:
- import os
nsems_max = os.sysconf("SC_SEM_NSEMS_MAX")
except (AttributeError, ValueError):
# sysconf not available or setting not available
diff --git a/Lib/concurrent/futures/thread.py b/Lib/concurrent/futures/thread.py
index fbac088..95bb682 100644
--- a/Lib/concurrent/futures/thread.py
+++ b/Lib/concurrent/futures/thread.py
@@ -74,7 +74,7 @@ def _worker(executor_reference, work_queue):
work_queue.put(None)
return
del executor
- except BaseException as e:
+ except BaseException:
_base.LOGGER.critical('Exception in worker', exc_info=True)
class ThreadPoolExecutor(_base.Executor):