summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/layerindexlib/__init__.py
diff options
context:
space:
mode:
authorFrazer Clews <frazerleslieclews@gmail.com>2020-08-24 15:51:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-25 18:14:53 +0100
commitabc6f864b9c6fa9a47a218a8250e79dcfa367d4d (patch)
treee4dfa762398e1b2a8ae019e0039417be3e85d99c /bitbake/lib/layerindexlib/__init__.py
parentac3593f6ed8f2ffb0bb62df47220b598cc1781f6 (diff)
downloadpoky-abc6f864b9c6fa9a47a218a8250e79dcfa367d4d.tar.gz
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>
Diffstat (limited to 'bitbake/lib/layerindexlib/__init__.py')
-rw-r--r--bitbake/lib/layerindexlib/__init__.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/bitbake/lib/layerindexlib/__init__.py b/bitbake/lib/layerindexlib/__init__.py
index 77196b408f..45157b6681 100644
--- a/bitbake/lib/layerindexlib/__init__.py
+++ b/bitbake/lib/layerindexlib/__init__.py
@@ -7,6 +7,7 @@ import datetime
7 7
8import logging 8import logging
9import imp 9import imp
10import os
10 11
11from collections import OrderedDict 12from collections import OrderedDict
12from layerindexlib.plugin import LayerIndexPluginUrlError 13from layerindexlib.plugin import LayerIndexPluginUrlError
@@ -70,7 +71,7 @@ class LayerIndex():
70 71
71 if self.__class__ != newIndex.__class__ or \ 72 if self.__class__ != newIndex.__class__ or \
72 other.__class__ != newIndex.__class__: 73 other.__class__ != newIndex.__class__:
73 raise TypeException("Can not add different types.") 74 raise TypeError("Can not add different types.")
74 75
75 for indexEnt in self.indexes: 76 for indexEnt in self.indexes:
76 newIndex.indexes.append(indexEnt) 77 newIndex.indexes.append(indexEnt)
@@ -266,8 +267,8 @@ will write out the individual elements split by layer and related components.
266 logger.debug(1, "Store not implemented in %s" % plugin.type) 267 logger.debug(1, "Store not implemented in %s" % plugin.type)
267 pass 268 pass
268 else: 269 else:
269 logger.debug(1, "No plugins support %s" % url) 270 logger.debug(1, "No plugins support %s" % indexURI)
270 raise LayerIndexException("No plugins support %s" % url) 271 raise LayerIndexException("No plugins support %s" % indexURI)
271 272
272 273
273 def is_empty(self): 274 def is_empty(self):
@@ -657,7 +658,7 @@ class LayerIndexObj():
657 if obj.id in self._index[indexname]: 658 if obj.id in self._index[indexname]:
658 if self._index[indexname][obj.id] == obj: 659 if self._index[indexname][obj.id] == obj:
659 continue 660 continue
660 raise LayerIndexError('Conflict adding object %s(%s) to index' % (indexname, obj.id)) 661 raise LayerIndexException('Conflict adding object %s(%s) to index' % (indexname, obj.id))
661 self._index[indexname][obj.id] = obj 662 self._index[indexname][obj.id] = obj
662 663
663 def add_raw_element(self, indexname, objtype, rawobjs): 664 def add_raw_element(self, indexname, objtype, rawobjs):
@@ -842,11 +843,11 @@ class LayerIndexObj():
842 843
843 def _resolve_dependencies(layerbranches, ignores, dependencies, invalid): 844 def _resolve_dependencies(layerbranches, ignores, dependencies, invalid):
844 for layerbranch in layerbranches: 845 for layerbranch in layerbranches:
845 if ignores and layerBranch.layer.name in ignores: 846 if ignores and layerbranch.layer.name in ignores:
846 continue 847 continue
847 848
848 for layerdependency in layerbranch.index.layerDependencies_layerBranchId[layerBranch.id]: 849 for layerdependency in layerbranch.index.layerDependencies_layerBranchId[layerbranch.id]:
849 deplayerbranch = layerDependency.dependency_layerBranch 850 deplayerbranch = layerdependency.dependency_layerBranch
850 851
851 if ignores and deplayerbranch.layer.name in ignores: 852 if ignores and deplayerbranch.layer.name in ignores:
852 continue 853 continue