Un-optimize conditional directory creation.

This commit is contained in:
Chris Hunt 2019-09-04 22:17:19 -04:00
parent 3473a6736d
commit 907bc82d8b
1 changed files with 9 additions and 7 deletions

View File

@ -1095,15 +1095,17 @@ class WheelBuilder(object):
output_dir = _cache.get_ephem_path_for_link(req.link)
else:
output_dir = _cache.get_path_for_link(req.link)
try:
ensure_dir(output_dir)
except OSError as e:
logger.warning("Building wheel for %s failed: %s",
req.name, e)
build_failure.append(req)
continue
else:
output_dir = self._wheel_dir
try:
ensure_dir(output_dir)
except OSError as e:
logger.warning("Building wheel for %s failed: %s",
req.name, e)
build_failure.append(req)
continue
wheel_file = self._build_one(
req, output_dir,
python_tag=python_tag,