commit:     79b2cda96ea63cb9e4dca2df92a1f980f03cfc1d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 22 20:45:14 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Mar 22 20:46:21 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=79b2cda9

AsynchronousTask: include self in InvalidStateError message

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/_emerge/AbstractEbuildProcess.py | 2 +-
 lib/_emerge/AsynchronousTask.py      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/_emerge/AbstractEbuildProcess.py 
b/lib/_emerge/AbstractEbuildProcess.py
index 45545ae15..cc1ea0f1a 100644
--- a/lib/_emerge/AbstractEbuildProcess.py
+++ b/lib/_emerge/AbstractEbuildProcess.py
@@ -388,7 +388,7 @@ class AbstractEbuildProcess(SpawnProcess):
                        SpawnProcess._async_wait(self)
                elif self._build_dir_unlock is None:
                        if self.returncode is None:
-                               raise asyncio.InvalidStateError('Result is not 
ready.')
+                               raise asyncio.InvalidStateError('Result is not 
ready for %s' % (self,))
                        self._async_unlock_builddir(returncode=self.returncode)
 
        def _async_unlock_builddir(self, returncode=None):

diff --git a/lib/_emerge/AsynchronousTask.py b/lib/_emerge/AsynchronousTask.py
index ec5497b69..aaab7433a 100644
--- a/lib/_emerge/AsynchronousTask.py
+++ b/lib/_emerge/AsynchronousTask.py
@@ -102,7 +102,7 @@ class AsynchronousTask(SlotObject):
                """
                if self.returncode is None:
                        if self.scheduler.is_running():
-                               raise asyncio.InvalidStateError('Result is not 
ready.')
+                               raise asyncio.InvalidStateError('Result is not 
ready for %s' % (self,))
                        self.scheduler.run_until_complete(self.async_wait())
                self._wait_hook()
                return self.returncode

Reply via email to