summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2016-12-20 21:50:01 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-21 08:17:01 +0000
commitd41d2fdd5648f6fe7103ef9e0869c97e8d04552f (patch)
treeb92c7887e41a56f33ae036197bf39b8ab098077f /bitbake/lib/bb
parent8ccf396c7284acd7e0fdf95473d317d23d05475f (diff)
downloadpoky-d41d2fdd5648f6fe7103ef9e0869c97e8d04552f.tar.gz
bitbake: 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. (Bitbake rev: c0c0af40ebddaf9dc99353c580a65d4c04295613) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/fetch2/wget.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py
index 88349c9bf9..737b98dd03 100644
--- a/bitbake/lib/bb/fetch2/wget.py
+++ b/bitbake/lib/bb/fetch2/wget.py
@@ -320,7 +320,7 @@ class Wget(FetchMethod):
320 n = netrc.netrc() 320 n = netrc.netrc()
321 login, unused, password = n.authenticators(urllib.parse.urlparse(uri).hostname) 321 login, unused, password = n.authenticators(urllib.parse.urlparse(uri).hostname)
322 add_basic_auth("%s:%s" % (login, password), r) 322 add_basic_auth("%s:%s" % (login, password), r)
323 except (ImportError, IOError, netrc.NetrcParseError): 323 except (TypeError, ImportError, IOError, netrc.NetrcParseError):
324 pass 324 pass
325 325
326 opener.open(r) 326 opener.open(r)