Bug 1361462 - Mozharness' tooltool should create directories if missing
MozReview-Commit-ID: 5HjD7smfCZx
--- a/testing/mozharness/mozharness/mozilla/tooltool.py
+++ b/testing/mozharness/mozharness/mozilla/tooltool.py
@@ -42,16 +42,19 @@ class TooltoolMixin(object):
# take care of auth. Everywhere else, we'll get auth failures if
# necessary.
if os.path.exists(fn):
return fn
def tooltool_fetch(self, manifest,
output_dir=None, privileged=False, cache=None):
"""docstring for tooltool_fetch"""
+ for d in (output_dir, cache):
+ if d is not None and not os.path.exists(d):
+ self.mkdir_p(d)
# Use vendored tooltool.py if available.
if self.topsrcdir:
cmd = [
sys.executable,
os.path.join(self.topsrcdir, 'python', 'mozbuild', 'mozbuild',
'action', 'tooltool.py')
]
elif self.config.get("download_tooltool"):