Bug #336651 - Fix Scheduler._restart_if_necessary() to correctly
authorZac Medico <zmedico@gentoo.org>
Thu, 9 Sep 2010 22:49:59 +0000 (15:49 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 9 Sep 2010 22:49:59 +0000 (15:49 -0700)
handle arguments like --exclude that are stored as a list since
they use the 'append' action.

pym/_emerge/Scheduler.py

index b6837f2cba13698b6f50f292a31c31266aeb5ffa..d45f26d9faca5b6a85a5f224db4f31682be2b0ec 100644 (file)
@@ -923,8 +923,12 @@ class Scheduler(PollScheduler):
                        if myopt not in bad_resume_opts:
                                if myarg is True:
                                        mynewargv.append(myopt)
+                               elif isinstance(myarg, list):
+                                       # arguments like --exclude that use 'append' action
+                                       for x in myarg:
+                                               mynewargv.append("%s=%s" % (myopt, x))
                                else:
-                                       mynewargv.append(myopt +"="+ str(myarg))
+                                       mynewargv.append("%s=%s" % (myopt, myarg))
                # priority only needs to be adjusted on the first run
                os.environ["PORTAGE_NICENESS"] = "0"
                os.execv(mynewargv[0], mynewargv)