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

Side by Side Diff: pylib/gyp/win_tool.py

Issue 10233002: ninja windows: don't print blank lines in RC wrapper (Closed) Base URL: https://gyp.googlecode.com/svn/trunk
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Utility functions for Windows builds. 7 """Utility functions for Windows builds.
8 8
9 These functions are executed via gyp-win-tool when using the ninja generator. 9 These functions are executed via gyp-win-tool when using the ninja generator.
10 """ 10 """
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return popen.returncode 91 return popen.returncode
92 92
93 def ExecRcWrapper(self, *args): 93 def ExecRcWrapper(self, *args):
94 """Filter logo banner from invocations of rc.exe. Older versions of RC 94 """Filter logo banner from invocations of rc.exe. Older versions of RC
95 don't support the /nologo flag.""" 95 don't support the /nologo flag."""
96 popen = subprocess.Popen( 96 popen = subprocess.Popen(
97 args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) 97 args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
98 out, _ = popen.communicate() 98 out, _ = popen.communicate()
99 for line in out.splitlines(): 99 for line in out.splitlines():
100 if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and 100 if (not line.startswith('Microsoft (R) Windows (R) Resource Compiler') and
101 not line.startswith('Copyright (C) Microsoft Corporation')): 101 not line.startswith('Copyright (C) Microsoft Corporation') and
102 line):
102 print line 103 print line
103 return popen.returncode 104 return popen.returncode
104 105
105 if __name__ == '__main__': 106 if __name__ == '__main__':
106 sys.exit(main(sys.argv[1:])) 107 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698