On 21 August 2015 at 12:37, Costin Constantin <costin.c.constan...@intel.com
> wrote:

> +        for item in oeTest.tc.pkgmanifest.split('\n'):
> +            if re.match(pkg, item):
> +                return True
> +                break
> +        else:
> +            return False
>

I just had to look up the for/else syntax as I'd never seen it before.
Whilst this works, the fact that the break statement is never executed (as
it returns beforehand) makes it a bit odd.  Personally I'd have done:

for item in ...:
  if re.match():
    return True
return False

Ross
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to