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

Unified Diff: Source/bindings/scripts/utilities.py

Issue 189543008: Factor abstract base class IDLCompiler, concrete class IDLComplierV8 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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: Source/bindings/scripts/utilities.py
diff --git a/Source/bindings/scripts/utilities.py b/Source/bindings/scripts/utilities.py
index 10679d46d211f002fbbec25c64556ed8ae47e328..edb065f89daa19052be3b60c9988ee1785318e61 100644
--- a/Source/bindings/scripts/utilities.py
+++ b/Source/bindings/scripts/utilities.py
@@ -24,13 +24,13 @@ def get_file_contents(filename):
return ''.join(f.readlines())
-def write_file(new_lines, destination_filename, only_if_changed):
+def write_file(new_text, destination_filename, only_if_changed):
if only_if_changed and os.path.isfile(destination_filename):
with open(destination_filename) as destination_file:
- if destination_file.readlines() == new_lines:
+ if destination_file.read() == new_text:
return
with open(destination_filename, 'w') as destination_file:
- destination_file.write(''.join(new_lines))
+ destination_file.write(new_text)
def write_pickle_file(pickle_filename, data, only_if_changed):
« Source/bindings/scripts/idl_compiler.py ('K') | « Source/bindings/scripts/idl_compiler.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698