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

Unified Diff: Tools/Scripts/webkitpy/common/system/systemhost.py

Issue 546613003: Add a new 'format-webkitpy' command that will reformat code to the style guide. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ready for review Created 6 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
Index: Tools/Scripts/webkitpy/common/system/systemhost.py
diff --git a/Tools/Scripts/webkitpy/common/system/systemhost.py b/Tools/Scripts/webkitpy/common/system/systemhost.py
index 2abab964fef19b0988486146026ec9a704921870..fb4f09a419ef36481ac9a5f62b1b3a57ed3cf99a 100644
--- a/Tools/Scripts/webkitpy/common/system/systemhost.py
+++ b/Tools/Scripts/webkitpy/common/system/systemhost.py
@@ -41,6 +41,9 @@ class SystemHost(object):
self.user = user.User()
self.platform = platforminfo.PlatformInfo(sys, platform, self.executive)
self.workspace = workspace.Workspace(self.filesystem, self.executive)
+ self.stdin = sys.stdin
+ self.stdout = sys.stdout
+ self.stderr = sys.stderr
def copy_current_environment(self):
return environment.Environment(os.environ.copy())
@@ -48,8 +51,5 @@ class SystemHost(object):
def print_(self, *args, **kwargs):
sep = kwargs.get('sep', ' ')
end = kwargs.get('end', '\n')
- file = kwargs.get('file', None)
- stderr = kwargs.get('stderr', False)
-
- file = file or (sys.stderr if stderr else sys.stdout)
- file.write(sep.join([str(arg) for arg in args]) + end)
+ stream = kwargs.get('stream', self.stdout)
+ stream.write(sep.join([str(arg) for arg in args]) + end)

Powered by Google App Engine
This is Rietveld 408576698