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

Unified Diff: gclient_scm.py

Issue 19777004: Catch and print OSError instead of Exception. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Use stderr Created 7 years, 5 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: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index fd7e3eed1c51fcdebefa3b64d08d7acd8f7c8ba8..e7147ce4058cc13b6d577d13283043bbf1defbfa 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -761,7 +761,7 @@ class GitWrapper(SCMWrapper):
if self.cache_dir:
if not os.path.exists(altfile):
try:
- with open(altfile, 'wa') as f:
+ with open(altfile, 'w') as f:
f.write(os.path.join(url, 'objects'))
# pylint: disable=C0301
# This dance is necessary according to emperical evidence, also at:
@@ -773,8 +773,8 @@ class GitWrapper(SCMWrapper):
# this path again next time.
try:
os.remove(altfile)
- except Exception:
- pass
+ except OSError as e:
+ print >> sys.stderr, "FAILED: os.remove('%s') -> %s" % (altfile, e)
raise
else:
if os.path.exists(altfile):
« 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