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

Unified Diff: ppapi/generators/idl_outfile.py

Issue 9088010: Output generated headers using Python's "wb" mode, to prevent EOL-munging. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address comment. Created 8 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/generators/idl_outfile.py
diff --git a/ppapi/generators/idl_outfile.py b/ppapi/generators/idl_outfile.py
index d717360f62f52085dc2e65bec18c60ec85831760..aa0b5aa34a2a588bc44628950de410dcce75f552 100755
--- a/ppapi/generators/idl_outfile.py
+++ b/ppapi/generators/idl_outfile.py
@@ -81,7 +81,7 @@ class IDLOutFile(object):
outtext = ''.join(self.outlist)
if not self.always_write:
if os.path.isfile(filename):
- intext = open(filename, 'r').read()
+ intext = open(filename, 'rb').read()
else:
intext = ''
@@ -106,7 +106,7 @@ class IDLOutFile(object):
os.makedirs(basepath)
if not GetOption('test'):
- outfile = open(filename, 'w')
+ outfile = open(filename, 'wb')
outfile.write(outtext)
InfoOut.Log('Output %s written.' % self.filename)
return True
« 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