Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: gclient_utils.py

Issue 3420014: Remove cruft from having to do bookeeping of options.stdout. (Closed)
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 924f0a57df5060be7a3b6b720856755859086563..9c7274bc86b40a32f682074d33e540c6f2898d08 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -549,8 +549,8 @@ class WorkItem(object):
# 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 @@ class ExecutionQueue(object):
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 @@ class ExecutionQueue(object):
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:
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698