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

Unified Diff: tools/licenses.py

Issue 2780983004: Reduce overbuilding due to about_credits.html (Closed)
Patch Set: Created 3 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
« 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: tools/licenses.py
diff --git a/tools/licenses.py b/tools/licenses.py
index 17dc94a3aab165e29e891a19b42189909aec5750..0da272cc874aecf95cebedfad98b73a8377b2518 100755
--- a/tools/licenses.py
+++ b/tools/licenses.py
@@ -585,8 +585,16 @@ def GenerateCredits(
escape=False)
if output_file:
- with open(output_file, 'w') as output:
- output.write(template_contents)
+ changed = True
+ try:
+ old_output = open(output_file, 'r').read()
+ if old_output == template_contents:
+ changed = False
+ except:
+ pass
+ if changed:
+ with open(output_file, 'w') as output:
+ output.write(template_contents)
else:
print template_contents
« 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