From fa724718bbc3945572df9f5e08ded97b8eb47be2 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 26 Sep 2008 01:45:17 +0000 Subject: Fix a potential IndexError inside display_preserved_libs(). svn path=/main/trunk/; revision=11553 --- pym/_emerge/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pym/_emerge/__init__.py') diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 70bf0f2e0..b93aba348 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -10893,10 +10893,8 @@ def display_preserved_libs(vardbapi): owners = vardbapi._owners.getFileOwnerMap(consumers[:MAX_DISPLAY+2]) for c in consumers[:MAX_DISPLAY]: print colorize("WARN", " * ") + " used by %s (%s)" % (c, ", ".join([x.mycpv for x in owners[c]])) - if len(consumers) > MAX_DISPLAY + 1: + if len(consumers) > MAX_DISPLAY: print colorize("WARN", " * ") + " used by %d other files" % (len(consumers) - MAX_DISPLAY) - else: - print colorize("WARN", " * ") + " used by %s (%s)" % (consumers[MAX_DISPLAY], ", ".join([x.mycpv for x in owners[consumers[MAX_DISPLAY]]])) print "Use " + colorize("GOOD", "emerge @preserved-rebuild") + " to rebuild packages using these libraries" -- cgit v1.2.3-1-g7c22