summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/build
diff options
context:
space:
mode:
authorrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-10 23:59:34 +0000
committerrafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-10 23:59:34 +0000
commit3269829189afca38b26b968f693bcc7e611f37c6 (patch)
tree798df844726c6ec8b7b1fe37e9693ea2d5418f37 /chrome/common/extensions/docs/build
parentc1641569cbca3b06fa39abbaf16b2fb879514794 (diff)
downloadchromium_src-3269829189afca38b26b968f693bcc7e611f37c6.zip
chromium_src-3269829189afca38b26b968f693bcc7e611f37c6.tar.gz
chromium_src-3269829189afca38b26b968f693bcc7e611f37c6.tar.bz2
Remove CRs from docs. Fix build.py script to not produce them
TBR=maruel Review URL: http://codereview.chromium.org/165247 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22975 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/build')
-rwxr-xr-xchrome/common/extensions/docs/build/build.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/common/extensions/docs/build/build.py b/chrome/common/extensions/docs/build/build.py
index de2c891..bcb690b 100755
--- a/chrome/common/extensions/docs/build/build.py
+++ b/chrome/common/extensions/docs/build/build.py
@@ -49,7 +49,7 @@ def RenderPage(name, test_shell):
# Copy page_shell to destination output and move aside original, if it exists.
original = None;
if (os.path.isfile(input_file)):
- original = open(input_file, 'r').read()
+ original = open(input_file, 'rb').read()
os.remove(input_file)
shutil.copy(_page_shell_html, input_file)
@@ -78,8 +78,10 @@ def RenderPage(name, test_shell):
"Look from javascript errors via the inspector.")
raise Exception("test_shell returned unexpected output: " + result);
+ # Remove CRs that are appearing from captured test_shell output.
+ result = result.replace('\r', '')
# Write output
- open(input_file, 'w').write(result);
+ open(input_file, 'wb').write(result);
if (original and result == original):
return None
else: