Re: [OE-core] [PATCH] bitbake.conf: fix suspicious comparison with ('' or 'custom')

2019-12-28 Thread Richard Purdie
On Sun, 2019-12-22 at 16:59 +0900, Masahiro Yamada wrote: > I am not sure what is intended by the code: > > d.getVar('TARGET_OS', d, 1) == ('' or 'custom') > > This is equivalent to: > > d.getVar('TARGET_OS', d, 1) == 'custom' > > If the intended behavior is to take the second element

[OE-core] [PATCH] bitbake.conf: fix suspicious comparison with ('' or 'custom')

2019-12-22 Thread Masahiro Yamada
I am not sure what is intended by the code: d.getVar('TARGET_OS', d, 1) == ('' or 'custom') This is equivalent to: d.getVar('TARGET_OS', d, 1) == 'custom' If the intended behavior is to take the second element of the array when TARGET_OS is empty or 'custom', the correct code would be: