mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
bitbake: contrib/dump_cache.py, cache: Fix to use python 3 syntax
Some tweaks to use python 3 syntax in a python 2 compatible way. (Bitbake rev: 322949c77dbaa4db01b5a43d85b39a2af67ba7b2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
7d06ec193e
commit
df1546952b
|
@ -36,7 +36,7 @@ def main(argv=None):
|
||||||
Get the mapping for the target recipe.
|
Get the mapping for the target recipe.
|
||||||
"""
|
"""
|
||||||
if len(argv) != 1:
|
if len(argv) != 1:
|
||||||
print >>sys.stderr, "Error, need one argument!"
|
print("Error, need one argument!", file=sys.stderr)
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
cachefile = argv[0]
|
cachefile = argv[0]
|
||||||
|
@ -56,7 +56,7 @@ def main(argv=None):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# 1.0 is the default version for a no PV recipe.
|
# 1.0 is the default version for a no PV recipe.
|
||||||
if val.__dict__.has_key("pv"):
|
if "pv" in val.__dict__:
|
||||||
pv = val.pv
|
pv = val.pv
|
||||||
else:
|
else:
|
||||||
pv = "1.0"
|
pv = "1.0"
|
||||||
|
|
|
@ -339,7 +339,7 @@ class Cache(object):
|
||||||
value = pickled.load()
|
value = pickled.load()
|
||||||
except Exception:
|
except Exception:
|
||||||
break
|
break
|
||||||
if self.depends_cache.has_key(key):
|
if key in self.depends_cache:
|
||||||
self.depends_cache[key].append(value)
|
self.depends_cache[key].append(value)
|
||||||
else:
|
else:
|
||||||
self.depends_cache[key] = [value]
|
self.depends_cache[key] = [value]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user