bitbake: fetch2: Avoid incorrect getVarFlag call

Calling getVarFlag with flag=None makes no sense, don't do it. Bitbake
used to silently ignore this, it now warns so avoid the warning.

(Bitbake rev: a68de8ace62eaba23856bfb301efbbe1824322aa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2018-10-17 10:54:40 +01:00
parent 76361c9b38
commit 24139e27c6

View File

@@ -1097,7 +1097,9 @@ def trusted_network(d, url):
return True
pkgname = d.expand(d.getVar('PN', False))
trusted_hosts = d.getVarFlag('BB_ALLOWED_NETWORKS', pkgname, False)
trusted_hosts = None
if pkgname:
trusted_hosts = d.getVarFlag('BB_ALLOWED_NETWORKS', pkgname, False)
if not trusted_hosts:
trusted_hosts = d.getVar('BB_ALLOWED_NETWORKS')