Bug 1246264 - Ensure cache directory exists for artifacts installation r=chmanchester

This commit is contained in:
Sambuddha Basu 2016-02-12 03:43:18 +05:30
parent 6fe3862e9a
commit 8eae6e84e6

View File

@ -5,6 +5,7 @@
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import errno
import itertools
import json
import logging
@ -1481,6 +1482,12 @@ class PackageFrontend(MachCommandBase):
state_dir = self._mach_context.state_dir
cache_dir = os.path.join(state_dir, 'package-frontend')
try:
os.makedirs(cache_dir)
except OSError as e:
if e.errno != errno.EEXIST:
raise
import which
if self._is_windows():
hg = which.which('hg.exe')