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

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

Issue 300273005: Bindings build: split compute_interfaces_info into 2 stages (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove debugging Created 6 years, 7 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 | « Source/bindings/scripts/compute_interfaces_info_overall.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/utilities.py
diff --git a/Source/bindings/scripts/utilities.py b/Source/bindings/scripts/utilities.py
index 2a1ec0ab807f6d0a562fef5918cbad7027f0de54..7a7a3e69f874fd98a634b871080dc63a363aad05 100644
--- a/Source/bindings/scripts/utilities.py
+++ b/Source/bindings/scripts/utilities.py
@@ -39,8 +39,12 @@ def write_file(new_text, destination_filename, only_if_changed):
def write_pickle_file(pickle_filename, data, only_if_changed):
if only_if_changed and os.path.isfile(pickle_filename):
with open(pickle_filename) as pickle_file:
- if pickle.load(pickle_file) == data:
- return
+ try:
+ if pickle.load(pickle_file) == data:
+ return
+ except (EOFError, pickle.UnpicklingError):
+ # If trouble unpickling, overwrite
+ pass
with open(pickle_filename, 'w') as pickle_file:
pickle.dump(data, pickle_file)
« no previous file with comments | « Source/bindings/scripts/compute_interfaces_info_overall.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698