Commit 53aa78bb authored by Reinout van Rees's avatar Reinout van Rees

Moved the various 'if dist is None' calls to the same indentation level

This way it is more clear that we're trying several things one after the
other. And it is nicer to read this way.
parent 2226a2ea
......@@ -650,20 +650,20 @@ class Installer:
if dist is None:
# Find the best distribution and add it to the map.
dist = ws.by_key.get(req.key)
if dist is None:
try:
dist = best[req.key] = env.best_match(req, ws)
except pkg_resources.VersionConflict as err:
raise VersionConflict(err, ws)
if dist is None:
if dest:
logger.debug('Getting required %r', str(req))
else:
logger.debug('Adding required %r', str(req))
_log_requirement(ws, req)
for dist in self._get_dist(req, ws,):
ws.add(dist)
self._maybe_add_setuptools(ws, dist)
if dist is None:
try:
dist = best[req.key] = env.best_match(req, ws)
except pkg_resources.VersionConflict as err:
raise VersionConflict(err, ws)
if dist is None:
if dest:
logger.debug('Getting required %r', str(req))
else:
logger.debug('Adding required %r', str(req))
_log_requirement(ws, req)
for dist in self._get_dist(req, ws,):
ws.add(dist)
self._maybe_add_setuptools(ws, dist)
if dist not in req:
# Oops, the "best" so far conflicts with a dependency.
raise VersionConflict(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment