--deselect: Print "would remove" instead of "removing" if --pretend is given
authorSebastian Luther <SebastianLuther@gmx.de>
Sat, 26 Jun 2010 05:16:31 +0000 (07:16 +0200)
committerZac Medico <zmedico@gentoo.org>
Sun, 27 Jun 2010 22:18:32 +0000 (15:18 -0700)
pym/_emerge/actions.py

index bc013483fd694cacc75689eb5f79a7a39357258d..af4380ed1a8b49ad9d0c1f6ca9fbbb282adf9c3e 100644 (file)
@@ -1194,8 +1194,12 @@ def action_deselect(settings, trees, opts, atoms):
                                                break
                if discard_atoms:
                        for atom in sorted(discard_atoms):
-                               print(">>> Removing %s from \"world\" favorites file..." % \
-                                       colorize("INFORM", str(atom)))
+                               if pretend:
+                                       print(">>> Would remove %s from \"world\" favorites file..." % \
+                                               colorize("INFORM", str(atom)))
+                               else:
+                                       print(">>> Removing %s from \"world\" favorites file..." % \
+                                               colorize("INFORM", str(atom)))
 
                        if '--ask' in opts:
                                prompt = "Would you like to remove these " + \