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
# 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))
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"])
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
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)
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])