[bitbake-devel,2/3] runqueue: Fix base class for sceneQueueComplete

Submitted by Tomasz Meresiński on Oct. 29, 2018, 4:39 p.m. | Patch ID: 155965

Details

Message ID 20181029163933.26646-3-tomasz.meresinski@comarch.pl
State New
Headers show

Commit Message

Tomasz Meresiński Oct. 29, 2018, 4:39 p.m.
__init__ method initialized bb.event.Event not sceneQueueEvent.
Change base class to bb.event.Event.

Signed-off-by: Tomasz Meresiński <tomasz.meresinski@comarch.com>
---
 lib/bb/runqueue.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 9ce06c40..e138a5c2 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2615,7 +2615,7 @@  class sceneQueueTaskFailed(sceneQueueEvent):
     def __str__(self):
         return "Setscene task (%s) failed with exit code '%s' - real task will be run instead" % (self.taskstring, self.exitcode)
 
-class sceneQueueComplete(sceneQueueEvent):
+class sceneQueueComplete(bb.event.Event):
     """
     Event when all the sceneQueue tasks are complete
     """

Comments

Christopher Larson Oct. 29, 2018, 6:05 p.m.
This looks wrong. Fix the __init__ instead.

On Mon, Oct 29, 2018 at 10:22 AM Tomasz Meresiński <
tomasz.meresinski@comarch.pl> wrote:

> __init__ method initialized bb.event.Event not sceneQueueEvent.
> Change base class to bb.event.Event.
>
> Signed-off-by: Tomasz Meresiński <tomasz.meresinski@comarch.com>
> ---
>  lib/bb/runqueue.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
> index 9ce06c40..e138a5c2 100644
> --- a/lib/bb/runqueue.py
> +++ b/lib/bb/runqueue.py
> @@ -2615,7 +2615,7 @@ class sceneQueueTaskFailed(sceneQueueEvent):
>      def __str__(self):
>          return "Setscene task (%s) failed with exit code '%s' - real task
> will be run instead" % (self.taskstring, self.exitcode)
>
> -class sceneQueueComplete(sceneQueueEvent):
> +class sceneQueueComplete(bb.event.Event):
>      """
>      Event when all the sceneQueue tasks are complete
>      """
> --
> 2.17.1
>
> --
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel
>
Tomasz Meresiński Oct. 29, 2018, 6:20 p.m.
All runQueueEvents are for specific task - its __init__ function has 
task parameter and it reads more parameters from it (taskname, taskfile 
and taskhash).
sceneQueueComplete event is fired when all tasks are complete, so for me 
it isn't a runQueueEvent, so it isn't sceneQueueEvent too.
Passing None as task is not an option, because runQueueEvent.__init__ 
will fail.

On 29.10.2018 19:05, Christopher Larson wrote:
> This looks wrong. Fix the __init__ instead.
>
> On Mon, Oct 29, 2018 at 10:22 AM Tomasz Meresiński 
> <tomasz.meresinski@comarch.pl <mailto:tomasz.meresinski@comarch.pl>> 
> wrote:
>
>     __init__ method initialized bb.event.Event not sceneQueueEvent.
>     Change base class to bb.event.Event.
>
>     Signed-off-by: Tomasz Meresiński <tomasz.meresinski@comarch.com
>     <mailto:tomasz.meresinski@comarch.com>>
>     ---
>      lib/bb/runqueue.py | 2 +-
>      1 file changed, 1 insertion(+), 1 deletion(-)
>
>     diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
>     index 9ce06c40..e138a5c2 100644
>     --- a/lib/bb/runqueue.py
>     +++ b/lib/bb/runqueue.py
>     @@ -2615,7 +2615,7 @@ class sceneQueueTaskFailed(sceneQueueEvent):
>          def __str__(self):
>              return "Setscene task (%s) failed with exit code '%s' -
>     real task will be run instead" % (self.taskstring, self.exitcode)
>
>     -class sceneQueueComplete(sceneQueueEvent):
>     +class sceneQueueComplete(bb.event.Event):
>          """
>          Event when all the sceneQueue tasks are complete
>          """
>     -- 
>     2.17.1
>
>     -- 
>     _______________________________________________
>     bitbake-devel mailing list
>     bitbake-devel@lists.openembedded.org
>     <mailto:bitbake-devel@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/bitbake-devel
>
>
>
> -- 
> Christopher Larson
> kergoth at gmail dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Senior Software Engineer, Mentor Graphics