--ask: show group warning before pretend prompt
authorZac Medico <zmedico@gentoo.org>
Sat, 4 Jun 2011 13:18:34 +0000 (06:18 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 4 Jun 2011 13:18:34 +0000 (06:18 -0700)
pym/_emerge/main.py

index 7b9ab61524710f9954c684870a10c1d899d02655..21dea40355ec2891ed5026b7ce93975bf76e87ad 100644 (file)
@@ -1732,13 +1732,13 @@ def emerge_main(args=None):
                                if "--ask" in myopts:
                                        writemsg_stdout("This action requires %s access...\n" % \
                                                (access_desc,), noiselevel=-1)
+                                       if portage.secpass < 1 and not need_superuser:
+                                               portage_group_warning()
                                        if userquery("Would you like to add --pretend to options?",
                                                "--ask-enter-invalid" in myopts) == "No":
                                                return 1
                                        myopts["--pretend"] = True
                                        del myopts["--ask"]
-                                       if portage.secpass < 1 and not need_superuser:
-                                               portage_group_warning()
                                else:
                                        sys.stderr.write(("emerge: %s access is required\n") \
                                                % access_desc)