bitbake: lib: fix most undefined code picked up by pylint

Correctly import, and inherit functions, and variables.
Also fix some typos and remove some Python 2 code that isn't recognised.

(Bitbake rev: b0c807be5c2170c9481c1a04d4c11972135d7dc5)

Signed-off-by: Frazer Clews <frazerleslieclews@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Frazer Clews
2020-08-24 15:51:37 +01:00
committed by Richard Purdie
parent ac3593f6ed
commit abc6f864b9
22 changed files with 51 additions and 42 deletions

View File

@@ -31,8 +31,7 @@ IETF secsh internet draft:
#
import re, os
from bb.fetch2 import FetchMethod
from bb.fetch2 import runfetchcmd
from bb.fetch2 import check_network_access, FetchMethod, ParameterError, runfetchcmd
__pattern__ = re.compile(r'''
@@ -65,7 +64,7 @@ class SSH(FetchMethod):
def urldata_init(self, urldata, d):
if 'protocol' in urldata.parm and urldata.parm['protocol'] == 'git':
raise bb.fetch2.ParameterError(
raise ParameterError(
"Invalid protocol - if you wish to fetch from a git " +
"repository using ssh, you need to use " +
"git:// prefix with protocol=ssh", urldata.url)
@@ -105,7 +104,7 @@ class SSH(FetchMethod):
dldir
)
bb.fetch2.check_network_access(d, cmd, urldata.url)
check_network_access(d, cmd, urldata.url)
runfetchcmd(cmd, d)