* Fix broke return code handling from previous commit, in
authorZac Medico <zmedico@gentoo.org>
Sun, 6 Jul 2008 06:48:41 +0000 (06:48 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 6 Jul 2008 06:48:41 +0000 (06:48 -0000)
  MergeListItem.execute().
* Fix TaskSequence._task_exit_handler() so it won't call
  final_exit() if _default_exit() has already set
  self._current_task to None.

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

pym/_emerge/__init__.py

index e750e764594f5c247f6aa1f514fff44b755019c0..b1fca922f70f3fc8f9695ac3d58dbfec2e5a91b0 100644 (file)
@@ -1607,8 +1607,9 @@ class TaskSequence(CompositeTask):
                        self._task_exit_handler)
 
        def _task_exit_handler(self, task):
-               if self._default_exit(task) == os.EX_OK and \
-                       self._task_queue:
+               if self._default_exit(task) != os.EX_OK:
+                       pass
+               elif self._task_queue:
                        self._start_next_task()
                else:
                        self._final_exit(task)
@@ -2781,6 +2782,9 @@ class MergeListItem(SlotObject):
 
                        retval = build.install()
 
+                       if retval != os.EX_OK:
+                               return retval
+
                elif pkg.type_name == "binary":
 
                        binpkg = Binpkg(find_blockers=find_blockers,