bitbake: fetch2/wget: Fix authentication in checkstatus() of the wget fetcher

I wonder how this used to work for anybody.

(Bitbake rev: 9481e9cd688f635a7fe2ac60d5826ac26f0cb9ba)

Signed-off-by: Stefan Klug <stefan.klug@baslerweb.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Stefan Klug
2019-03-18 14:58:20 +01:00
committed by Richard Purdie
parent 8c582d39ff
commit 0a9161855c

View File

@@ -322,8 +322,8 @@ class Wget(FetchMethod):
authheader = "Basic %s" % encodeuser
r.add_header("Authorization", authheader)
if ud.user:
add_basic_auth(ud.user, r)
if ud.user and ud.pswd:
add_basic_auth(ud.user + ':' + ud.pswd, r)
try:
import netrc, urllib.parse