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

Unified Diff: recipe_modules/bot_update/resources/bot_update.py

Issue 2448983004: Log error message if os.rename fails (Closed)
Patch Set: Log error message if os.rename fails Created 4 years, 2 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: recipe_modules/bot_update/resources/bot_update.py
diff --git a/recipe_modules/bot_update/resources/bot_update.py b/recipe_modules/bot_update/resources/bot_update.py
index 3211369667372e4ec45a6b52343120b69985a912..aa772894774e82cfd85cc33ae2e176c5598542d6 100755
--- a/recipe_modules/bot_update/resources/bot_update.py
+++ b/recipe_modules/bot_update/resources/bot_update.py
@@ -299,7 +299,11 @@ def remove(target):
os.makedirs(dead_folder)
dest = path.join(dead_folder, uuid.uuid4().hex)
print 'Marking for removal %s => %s' % (target, dest)
- os.rename(target, dest)
+ try:
+ os.rename(target, dest)
+ except Exception as e:
+ print 'Error renaming %s to %s: %s' % (target, dest, str(e))
+ raise
def ensure_no_checkout(dir_names):
« 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