Revision: 18441
Author: [email protected]
Date: Thu Jan 2 15:06:27 2014 UTC
Log: Don't bail out of the cpplint cache is broken.
Instead, try to remove it.
BUG=none
[email protected]
LOG=n
Review URL: https://codereview.chromium.org/117823013
http://code.google.com/p/v8/source/detail?r=18441
Modified:
/branches/bleeding_edge/tools/presubmit.py
=======================================
--- /branches/bleeding_edge/tools/presubmit.py Fri Nov 22 13:50:39 2013 UTC
+++ /branches/bleeding_edge/tools/presubmit.py Thu Jan 2 15:06:27 2014 UTC
@@ -144,8 +144,8 @@
try:
sums_file = open(self.sums_file_name, 'r')
self.sums = pickle.load(sums_file)
- except IOError:
- # File might not exist, this is OK.
+ except:
+ # Cannot parse pickle for any reason. Not much we can do about it.
pass
finally:
if sums_file:
@@ -155,6 +155,14 @@
try:
sums_file = open(self.sums_file_name, 'w')
pickle.dump(self.sums, sums_file)
+ except:
+ # Failed to write pickle. Try to clean-up behind us.
+ if sums_file:
+ sums_file.close()
+ try:
+ os.unlink(self.sums_file_name)
+ except:
+ pass
finally:
sums_file.close()
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.