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

Unified Diff: git_cache.py

Issue 2492963002: bot_update: Use 'gclient' from same repository. (Closed)
Patch Set: Also don't ignore move errors in git cache. Created 4 years, 1 month 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 | recipe_modules/bot_update/resources/bot_update.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cache.py
diff --git a/git_cache.py b/git_cache.py
index 60dfa1c1fa637b26b2e24556052dfaefac0294c6..0f66de72e9746b170df01982ccbf6ebaf0ac1936 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -439,16 +439,9 @@ class Mirror(object):
self._fetch(tempdir or self.mirror_path, verbose, depth)
finally:
if tempdir:
- try:
- if os.path.exists(self.mirror_path):
- gclient_utils.rmtree(self.mirror_path)
- os.rename(tempdir, self.mirror_path)
- except OSError as e:
- # This is somehow racy on Windows.
- # Catching OSError because WindowsError isn't portable and
- # pylint complains.
- self.print('Error moving %s to %s: %s' % (tempdir, self.mirror_path,
- str(e)))
+ if os.path.exists(self.mirror_path):
+ gclient_utils.rmtree(self.mirror_path)
+ os.rename(tempdir, self.mirror_path)
if not ignore_lock:
lockfile.unlock()
« no previous file with comments | « no previous file | recipe_modules/bot_update/resources/bot_update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698