From: Mark Asselstine <mark.asselstine@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH] bitbake: fetch2/wget: fixup case with no netrc data
Date: Tue, 20 Dec 2016 21:44:48 -0500 [thread overview]
Message-ID: <2878173.NEvyd15rBg@tal> (raw)
In-Reply-To: <1482288080-12147-1-git-send-email-mark.asselstine@windriver.com>
Sorry, I just noticed I left the 'bitbake:' prefix on the short log as I
originally prepared this commit in poky. I will send a V2 with this dropped.
Sorry for the noise.
Mark
On Tuesday, December 20, 2016 9:41:20 PM EST Mark Asselstine wrote:
> Commit 873e33d0479e977520106b65d149ff1799195bf6 [bitbake: 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@windriver.com>
> ---
> 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)
prev parent reply other threads:[~2016-12-21 2:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-21 2:41 [PATCH] bitbake: fetch2/wget: fixup case with no netrc data Mark Asselstine
2016-12-21 2:44 ` Mark Asselstine [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2878173.NEvyd15rBg@tal \
--to=mark.asselstine@windriver.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.