[bitbake-devel] [PATCH] lib: amend code to use proper singleton comparisons where possible
Ross Burton
ross.burton at intel.com
Wed Jan 15 14:07:55 UTC 2020
On 14/01/2020 14:40, frazer.clews at codethink.co.uk wrote:
> --- a/lib/bb/fetch2/osc.py
> +++ b/lib/bb/fetch2/osc.py
> @@ -43,7 +43,7 @@ class Osc(FetchMethod):
> else:
> pv = d.getVar("PV", False)
> rev = bb.fetch2.srcrev_internal_helper(ud, d)
> - if rev and rev != True:
> + if rev and not rev:
> ud.revision = rev
> else:
> ud.revision = ""
I don't think that's what was intended!
The previous logic is saying "if rev as a bool is true and if rev is not
actually True" then do something. srcrev_internal_helper appears to
always return a string or None so I'd imagine this test could be
simplified to just if rev.
Ross
More information about the bitbake-devel
mailing list