1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

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
+8 -7
View File
@@ -7,6 +7,7 @@ import datetime
import logging
import imp
import os
from collections import OrderedDict
from layerindexlib.plugin import LayerIndexPluginUrlError
@@ -70,7 +71,7 @@ class LayerIndex():
if self.__class__ != newIndex.__class__ or \
other.__class__ != newIndex.__class__:
raise TypeException("Can not add different types.")
raise TypeError("Can not add different types.")
for indexEnt in self.indexes:
newIndex.indexes.append(indexEnt)
@@ -266,8 +267,8 @@ will write out the individual elements split by layer and related components.
logger.debug(1, "Store not implemented in %s" % plugin.type)
pass
else:
logger.debug(1, "No plugins support %s" % url)
raise LayerIndexException("No plugins support %s" % url)
logger.debug(1, "No plugins support %s" % indexURI)
raise LayerIndexException("No plugins support %s" % indexURI)
def is_empty(self):
@@ -657,7 +658,7 @@ class LayerIndexObj():
if obj.id in self._index[indexname]:
if self._index[indexname][obj.id] == obj:
continue
raise LayerIndexError('Conflict adding object %s(%s) to index' % (indexname, obj.id))
raise LayerIndexException('Conflict adding object %s(%s) to index' % (indexname, obj.id))
self._index[indexname][obj.id] = obj
def add_raw_element(self, indexname, objtype, rawobjs):
@@ -842,11 +843,11 @@ class LayerIndexObj():
def _resolve_dependencies(layerbranches, ignores, dependencies, invalid):
for layerbranch in layerbranches:
if ignores and layerBranch.layer.name in ignores:
if ignores and layerbranch.layer.name in ignores:
continue
for layerdependency in layerbranch.index.layerDependencies_layerBranchId[layerBranch.id]:
deplayerbranch = layerDependency.dependency_layerBranch
for layerdependency in layerbranch.index.layerDependencies_layerBranchId[layerbranch.id]:
deplayerbranch = layerdependency.dependency_layerBranch
if ignores and deplayerbranch.layer.name in ignores:
continue