From 63459a27073bfc0e84cc49486bd2769d68c94fa2 Mon Sep 17 00:00:00 2001 From: Rafael Caricio Date: Fri, 7 Sep 2012 18:18:48 -0400 Subject: [PATCH] Little refactory. --- pip/commands/status.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pip/commands/status.py b/pip/commands/status.py index 301e081a7..a17a1b1d5 100644 --- a/pip/commands/status.py +++ b/pip/commands/status.py @@ -21,6 +21,7 @@ class StatusCommand(Command): results = search_packages_info(query) print_results(results) + def search_packages_info(query): """ Gather details from installed distributions. Print distribution name, @@ -59,9 +60,8 @@ def print_results(distributions): logger.notify("Version: %s" % dist['version']) logger.notify("Location: %s" % dist['location']) logger.notify("Files:") - filelist = dist.get('files', None) - if filelist: - for i, line in enumerate(open(filelist)): + if 'files' in dist: + for i, line in enumerate(open(dist['files'])): logger.notify(" %s" % line.strip()) if i > 20: logger.notify(" and more.")