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

Unified Diff: gclient_utils.py

Issue 825133002: Speculative fix for build on windows build bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: expected_root Created 6 years 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 | git_cache.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 069d5d759e669317815ea069353e1b05358f2554..8d4cf3fe12054f611949bdc0edba409cace5b1a2 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -166,6 +166,13 @@ def safe_rename(old, new):
time.sleep(0.1)
+def rm_file_or_tree(path):
+ if os.path.isfile(path):
+ os.remove(path)
+ else:
+ rmtree(path)
+
+
def rmtree(path):
"""shutil.rmtree() on steroids.
« no previous file with comments | « no previous file | git_cache.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698