summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-07 13:56:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-09 14:04:19 +0100
commit3dff13793e875ff58cc38c4a960caca9b6969843 (patch)
treec2ccda6240f9955db9e9ead345d0230439d4a5b4
parente2e1dcd74bc45381baccf507c0309dd792229afe (diff)
downloadopenembedded-core-3dff13793e875ff58cc38c4a960caca9b6969843.tar.gz
openembedded-core-3dff13793e875ff58cc38c4a960caca9b6969843.tar.bz2
openembedded-core-3dff13793e875ff58cc38c4a960caca9b6969843.zip
image/kernel-module-split/eglibc-ld.inc: Remove has_key() usage
The has_key() attribute has been removed in python 3 since there is better syntax available. Use the improved syntax. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/image.bbclass2
-rw-r--r--meta/classes/kernel-module-split.bbclass4
-rw-r--r--meta/lib/oe/prservice.py2
-rw-r--r--meta/lib/oe/qa.py2
-rw-r--r--meta/recipes-core/eglibc/eglibc-ld.inc2
5 files changed, 6 insertions, 6 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 979921f58c..251bc9abfd 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -368,7 +368,7 @@ for dir in dirs.split():
key=str(os.path.join("/",os.path.relpath(item,dir)))
valid=True;
- if files.has_key(key):
+ if key in files:
#check whether the file is allow to replace
if allow_rep.match(key):
valid=True
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 45639c613c..9a4329dcc9 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -109,7 +109,7 @@ python split_kernel_module_packages () {
# instead is prefixed with /lib/modules/${KERNEL_VERSION}
file = file.replace("/lib/modules/%s/" % d.getVar('KERNEL_VERSION', True) or '', '', 1)
- if module_deps.has_key(file):
+ if file in module_deps:
dependencies = []
for i in module_deps[file]:
m = re.match(pattern, os.path.basename(i))
@@ -153,7 +153,7 @@ python split_kernel_module_packages () {
files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename)
d.setVar('FILES_%s' % pkg, files)
- if vals.has_key("description"):
+ if "description" in vals:
old_desc = d.getVar('DESCRIPTION_' + pkg, True) or ""
d.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"])
diff --git a/meta/lib/oe/prservice.py b/meta/lib/oe/prservice.py
index 27883a7e90..b0cbcb1fbc 100644
--- a/meta/lib/oe/prservice.py
+++ b/meta/lib/oe/prservice.py
@@ -101,7 +101,7 @@ def prserv_export_tofile(d, metainfo, datainfo, lockdown, nomax=False):
for i in range(len(datainfo)):
pkgarch = datainfo[i]['pkgarch']
value = datainfo[i]['value']
- if not idx.has_key(pkgarch):
+ if pkgarch not in idx:
idx[pkgarch] = i
elif value > datainfo[idx[pkgarch]]['value']:
idx[pkgarch] = i
diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index c4376f0161..d5cdaa0fcd 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -93,7 +93,7 @@ class ELFFile:
import bb.process
import sys
- if self.objdump_output.has_key(cmd):
+ if cmd in self.objdump_output:
return self.objdump_output[cmd]
objdump = d.getVar('OBJDUMP', True)
diff --git a/meta/recipes-core/eglibc/eglibc-ld.inc b/meta/recipes-core/eglibc/eglibc-ld.inc
index e596b5591f..b1701f008b 100644
--- a/meta/recipes-core/eglibc/eglibc-ld.inc
+++ b/meta/recipes-core/eglibc/eglibc-ld.inc
@@ -1,7 +1,7 @@
def ld_append_if_tune_exists(d, infos, dict):
tune = d.getVar("DEFAULTTUNE", True) or ""
libdir = d.getVar("base_libdir", True) or ""
- if dict.has_key(tune):
+ if tune in dict:
infos['ldconfig'].add('{"' + libdir + '/' + dict[tune][0] + '",' + dict[tune][1] + ' }')
infos['lddrewrite'].add(libdir+'/'+dict[tune][0])