Remove cruft from having to do bookeeping of options.stdout.
This makes the code saner to understand.
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/3420014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@60050 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_utils.py b/gclient_utils.py
index 924f0a5..9c7274b 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -549,8 +549,8 @@
# A unique string representing this work item.
name = None
- def run(self, work_queue, options):
- """work_queue and options are passed as keyword arguments so they should be
+ def run(self, work_queue):
+ """work_queue is passed as keyword argument so it should be
the last parameters of the function when you override it."""
pass
@@ -661,7 +661,7 @@
self.running.append(t)
else:
t.join()
- t.kwargs['options'].stdout.full_flush()
+ sys.stdout.full_flush()
if self.progress:
self.progress.update(1)
assert not t.item.name in self.ran
@@ -672,10 +672,7 @@
if self.jobs > 1:
# Start the thread.
index = len(self.ran) + len(self.running) + 1
- # Copy 'options'.
- task_kwargs = kwargs.copy()
- task_kwargs['options'] = copy.copy(task_kwargs['options'])
- new_thread = self._Worker(task_item, index, args, task_kwargs)
+ new_thread = self._Worker(task_item, index, args, kwargs)
self.running.append(new_thread)
new_thread.start()
else: