Fix ValueError triggered when Scheduler._choose_pkg() doesn't find a package
authorZac Medico <zmedico@gentoo.org>
Tue, 8 Jul 2008 10:49:02 +0000 (10:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Jul 2008 10:49:02 +0000 (10:49 -0000)
and returns None.

svn path=/main/trunk/; revision=10985

pym/_emerge/__init__.py

index 66f5ce4eef3ca684db13b934a8b9e1d78e37e17d..d7cd8fa112cce377a2315ee606d3b5ffb2caf0fd 100644 (file)
@@ -8101,7 +8101,8 @@ class Scheduler(object):
                                chosen_pkg = pkg
                                break
 
-               self._pkg_queue.remove(chosen_pkg)
+               if chosen_pkg is not None:
+                       self._pkg_queue.remove(chosen_pkg)
                return chosen_pkg
 
        def _dependent_on_scheduled_merges(self, pkg):