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

Unified Diff: tools/android/loading/common_util.py

Issue 1872313002: sandwich: Implement SandwichTaskBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses pasko's comments Created 4 years, 8 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 | tools/android/loading/sandwich.py » ('j') | tools/android/loading/sandwich_misc.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/common_util.py
diff --git a/tools/android/loading/common_util.py b/tools/android/loading/common_util.py
index 855284fdcf5761b43190047ac6ae5440cb1614f8..350a418ed8410533cf4ee016223409c7b07d6cc9 100644
--- a/tools/android/loading/common_util.py
+++ b/tools/android/loading/common_util.py
@@ -89,3 +89,10 @@ def TemporaryDirectory():
yield name
finally:
shutil.rmtree(name)
+
+
+def EnsureParentDirectoryExists(path):
+ """Verifies that the parent directory exists or creates it if missing."""
+ parent_directory_path = os.path.abspath(os.path.dirname(path))
+ if not os.path.isdir(parent_directory_path):
+ os.makedirs(parent_directory_path)
« no previous file with comments | « no previous file | tools/android/loading/sandwich.py » ('j') | tools/android/loading/sandwich_misc.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698