Skip to content
This repository was archived by the owner on Apr 19, 2019. It is now read-only.

Commit 35c16eb

Browse files
masselstineostroproject-ci
authored andcommitted
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. (From bitbake rev: c0c0af40ebddaf9dc99353c580a65d4c04295613) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 parent 7329418 commit 35c16eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitbake/lib/bb/fetch2/wget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def add_basic_auth(login_str, request):
320320
n = netrc.netrc()
321321
login, unused, password = n.authenticators(urllib.parse.urlparse(uri).hostname)
322322
add_basic_auth("%s:%s" % (login, password), r)
323-
except (ImportError, IOError, netrc.NetrcParseError):
323+
except (TypeError, ImportError, IOError, netrc.NetrcParseError):
324324
pass
325325

326326
opener.open(r)

0 commit comments

Comments
 (0)