[oe-commits] [bitbake] 16/20: fetch2: Avoid incorrect getVarFlag call

git at git.openembedded.org git at git.openembedded.org
Wed Oct 17 11:26:08 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository bitbake.

commit a68de8ace62eaba23856bfb301efbbe1824322aa
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Oct 17 10:54:40 2018 +0100

    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.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 9aea08b..2b62b41 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -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')

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list