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: ...@@ -650,20 +650,20 @@ class Installer:
if dist is None: if dist is None:
# Find the best distribution and add it to the map. # Find the best distribution and add it to the map.
dist = ws.by_key.get(req.key) dist = ws.by_key.get(req.key)
if dist is None: if dist is None:
try: try:
dist = best[req.key] = env.best_match(req, ws) dist = best[req.key] = env.best_match(req, ws)
except pkg_resources.VersionConflict as err: except pkg_resources.VersionConflict as err:
raise VersionConflict(err, ws) raise VersionConflict(err, ws)
if dist is None: if dist is None:
if dest: if dest:
logger.debug('Getting required %r', str(req)) logger.debug('Getting required %r', str(req))
else: else:
logger.debug('Adding required %r', str(req)) logger.debug('Adding required %r', str(req))
_log_requirement(ws, req) _log_requirement(ws, req)
for dist in self._get_dist(req, ws,): for dist in self._get_dist(req, ws,):
ws.add(dist) ws.add(dist)
self._maybe_add_setuptools(ws, dist) self._maybe_add_setuptools(ws, dist)
if dist not in req: if dist not in req:
# Oops, the "best" so far conflicts with a dependency. # Oops, the "best" so far conflicts with a dependency.
raise VersionConflict( 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