Fix the "Unmatch removal atoms" (second try) to show the correct
authorZac Medico <zmedico@gentoo.org>
Sat, 18 Sep 2010 10:48:53 +0000 (03:48 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 18 Sep 2010 10:48:53 +0000 (03:48 -0700)
number of undisplayed atoms when there are more than 3.

pym/portage/util/__init__.py

index fed229a5de6fd1b9fd8d1ac291a24144107cc6bd..9542826b20e9a9fb17ffaa249ff18782751d1779 100644 (file)
@@ -271,9 +271,10 @@ def stack_lists(lists, incremental=1, remember_source_file=False,
 
        if warn_for_unmatched_removal:
                for source_file, tokens in unmatched_removals.items():
-                       if len(tokens) > 4:
+                       if len(tokens) > 3:
                                selected = [tokens.pop(), tokens.pop(), tokens.pop()]
-                               writemsg(_("--- Unmatch removal atoms in %s: %s and %s more\n") % (source_file, ", ".join(selected), len(tokens)-3),
+                               writemsg(_("--- Unmatch removal atoms in %s: %s and %s more\n") % \
+                                       (source_file, ", ".join(selected), len(tokens)),
                                        noiselevel=-1)
                        else:
                                writemsg(_("--- Unmatch removal atom(s) in %s: %s\n") % (source_file, ", ".join(tokens)),