[bitbake-devel] [PATCH] event/server: Add _uiready flag to handle missing error messages

Christopher Larson clarson at kergoth.com
Thu Sep 3 17:54:17 UTC 2015


On Thu, Sep 3, 2015 at 7:20 AM, Richard Purdie <
richard.purdie at linuxfoundation.org> wrote:

> -        self.event_handle = bb.event.register_UIHhandler(s)
> +        self.event_handle = bb.event.register_UIHhandler(s, True)
>

Minor quibble: when using positional arguments of this sort, directly,
without an intermediate variable, when reading it, it's not clear what the
argument is doing. Admittedly, we do this all the time with getVar(), but
really that was a crappy API to begin with :) The code becomes a bit more
readable if you pass the argument name as though it was a keyword argument,
so we have context when reading it, e.g.:

    self.event_handle = bb.event.register_UIHhandler(s, mainui=True)

Obviously, this is relatively minor, so shouldn't block a merge, but it's
something to keep in mind going forward.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20150903/1fcc7753/attachment-0002.html>


More information about the bitbake-devel mailing list