[oe] [PATCH 12/12] task-base.bb: use uniform test for set
Khem Raj
raj.khem at gmail.com
Thu Feb 11 21:57:55 UTC 2010
On Thu, Feb 11, 2010 at 5:04 AM, Phil Blundell <philb at gnu.org> wrote:
> On Mon, 2010-02-08 at 22:14 +0100, Bernhard Reutner-Fischer wrote:
>> - if not hasattr(__builtins__, 'set'):
>> + try:
>> + set
>> + except NameError:
>> from sets import Set as set
>
> It's not completely obvious to me that this patch is an improvement: it
> replaces a single line of code with three new ones and doesn't seem to
> change the outcome. Maybe one of our Python überhackers can comment on
> whether or not this is really better.
hasatts uses getattr and catches the exception from getattr. There was
a problem in hasattr where it returned False on
any exception generated from getaddr so the result could be
unreliable. But this may not be applicable in this particular case
I still see
NOTE: Handling BitBake files: \ (7015/8051) [87 %]__builtin__:10:
DeprecationWarning: the sets module is deprecated
NOTE: Handling BitBake files: | (8051/8051) [100 %]
Parsing of 8051 .bb files complete (0 cached, 8051 parsed). 7800
targets, 333 skipped, 157 masked, 0 errors.
>
> p.
>
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
More information about the Openembedded-devel
mailing list