[oe-commits] [bitbake] branch master updated: fetch2/wget: fixup case with no useful netrc data

git at git.openembedded.org git at git.openembedded.org
Wed Dec 21 08:17:33 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

The following commit(s) were added to refs/heads/master by this push:
       new  c0c0af4   fetch2/wget: fixup case with no useful netrc data
c0c0af4 is described below

commit c0c0af40ebddaf9dc99353c580a65d4c04295613
Author: Mark Asselstine <mark.asselstine at windriver.com>
AuthorDate: Tue Dec 20 21:50:01 2016 -0500

    fetch2/wget: fixup case with no useful netrc data
    
    Commit 873e33d0479e977520106b65d149ff1799195bf6 [fetch2/wget:
    add Basic Auth from netrc to checkstatus()] causes "Fetcher failure
    for URL: 'https://www.example.com/'. URL https://www.example.com/
    doesn't work." on new builds when a user has a .netrc file but there
    is no default and no matching host. The call to netrc.authenticators()
    will return None in these cases and the attempted assignment to the
    3-tuple will raise a TypeError exception. Add the TypeError to the
    exceptions caught to get around this issue.
    
    Signed-off-by: Mark Asselstine <mark.asselstine at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/wget.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
index 88349c9..737b98d 100644
--- a/lib/bb/fetch2/wget.py
+++ b/lib/bb/fetch2/wget.py
@@ -320,7 +320,7 @@ class Wget(FetchMethod):
                 n = netrc.netrc()
                 login, unused, password = n.authenticators(urllib.parse.urlparse(uri).hostname)
                 add_basic_auth("%s:%s" % (login, password), r)
-            except (ImportError, IOError, netrc.NetrcParseError):
+            except (TypeError, ImportError, IOError, netrc.NetrcParseError):
                  pass
 
             opener.open(r)

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


More information about the Openembedded-commits mailing list