1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Use logger.indent instead of printing spaces.

This commit is contained in:
Cody Soyland 2010-02-22 18:10:56 -05:00
parent b439b9f42f
commit 02085e8858

View file

@ -85,8 +85,12 @@ def print_results(hits, name_column_width=25, terminal_width=None):
logger.notify(line)
if name in installed_packages:
dist = pkg_resources.get_distribution(name)
logger.notify(' INSTALLED: %s' % dist.version)
logger.notify(' LATEST: %s' % highest_version(hit['versions']))
logger.indent += 2
try:
logger.notify('INSTALLED: %s' % dist.version)
logger.notify('LATEST: %s' % highest_version(hit['versions']))
finally:
logger.indent -= 2
except UnicodeEncodeError:
pass