Skip to content

Commit

Permalink
Don't bail out of the cpplint cache is broken.
Browse files Browse the repository at this point in the history
Instead, try to remove it.

BUG=none
R=ulan@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/117823013

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@18441 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information
jochen@chromium.org committed Jan 2, 2014
1 parent e73f4da commit d266876
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tools/presubmit.py
Expand Up @@ -144,8 +144,8 @@ def Load(self):
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:
Expand All @@ -155,6 +155,14 @@ def Save(self):
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()

Expand Down

0 comments on commit d266876

Please sign in to comment.