summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/MetadataRegen.py4
-rw-r--r--pym/_emerge/PollSelectAdapter.py2
-rw-r--r--pym/_emerge/actions.py4
-rw-r--r--pym/_emerge/unmerge.py2
-rw-r--r--pym/portage/__init__.py22
5 files changed, 17 insertions, 17 deletions
diff --git a/pym/_emerge/MetadataRegen.py b/pym/_emerge/MetadataRegen.py
index 6bfd722c2..287312e17 100644
--- a/pym/_emerge/MetadataRegen.py
+++ b/pym/_emerge/MetadataRegen.py
@@ -89,7 +89,7 @@ class MetadataRegen(PollScheduler):
if self._global_cleanse:
for mytree in portdb.porttrees:
try:
- dead_nodes[mytree] = set(portdb.auxdb[mytree].keys())
+ dead_nodes[mytree] = set(portdb.auxdb[mytree])
except CacheError as e:
portage.writemsg("Error listing cache entries for " + \
"'%s': %s, continuing...\n" % (mytree, e),
@@ -103,7 +103,7 @@ class MetadataRegen(PollScheduler):
for mytree in portdb.porttrees:
try:
dead_nodes[mytree] = set(cpv for cpv in \
- portdb.auxdb[mytree].keys() \
+ portdb.auxdb[mytree] \
if cpv_getkey(cpv) in cp_set)
except CacheError as e:
portage.writemsg("Error listing cache entries for " + \
diff --git a/pym/_emerge/PollSelectAdapter.py b/pym/_emerge/PollSelectAdapter.py
index 7b7d3d95a..b136e7eb0 100644
--- a/pym/_emerge/PollSelectAdapter.py
+++ b/pym/_emerge/PollSelectAdapter.py
@@ -48,7 +48,7 @@ class PollSelectAdapter(PollConstants):
select_args = self._select_args
if select_args is None:
- select_args = [list(self._registered.keys()), [], []]
+ select_args = [list(self._registered), [], []]
if timeout is not None:
select_args = select_args[:]
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index 4cae98f29..b33fb5079 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -1290,7 +1290,7 @@ def action_info(settings, trees, myopts, myfiles):
libtool_vers = ",".join(trees["/"]["vartree"].dbapi.match("sys-devel/libtool"))
if "--verbose" in myopts:
- myvars=list(settings.keys())
+ myvars = list(settings)
else:
myvars = ['GENTOO_MIRRORS', 'CONFIG_PROTECT', 'CONFIG_PROTECT_MASK',
'PORTDIR', 'DISTDIR', 'PKGDIR', 'PORTAGE_TMPDIR',
@@ -1650,7 +1650,7 @@ def action_metadata(settings, portdb, myopts, porttrees=None):
for tree_data in porttrees_data:
try:
- dead_nodes = set(tree_data.dest_db.keys())
+ dead_nodes = set(tree_data.dest_db)
except CacheError as e:
writemsg_level("Error listing cache entries for " + \
"'%s': %s, continuing...\n" % (tree_data.path, e),
diff --git a/pym/_emerge/unmerge.py b/pym/_emerge/unmerge.py
index b97207d68..4d2a546c5 100644
--- a/pym/_emerge/unmerge.py
+++ b/pym/_emerge/unmerge.py
@@ -243,7 +243,7 @@ def unmerge(root_config, myopts, unmerge_action,
slotmap[myslot][vartree.dbapi.cpv_counter(mypkg)] = mypkg
for myslot in slotmap:
- counterkeys = list(slotmap[myslot].keys())
+ counterkeys = list(slotmap[myslot])
if not counterkeys:
continue
counterkeys.sort()
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 3adf55923..b942815e0 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -2620,7 +2620,7 @@ class config(object):
for i, pkgprofileuse_dict in enumerate(self.pkgprofileuse):
cpdict = pkgprofileuse_dict.get(cp)
if cpdict:
- keys = list(cpdict.keys())
+ keys = list(cpdict)
while keys:
bestmatch = best_match_to_list(cpv_slot, keys)
if bestmatch:
@@ -2650,7 +2650,7 @@ class config(object):
self.puse = ""
cpdict = self.pusedict.get(cp)
if cpdict:
- keys = list(cpdict.keys())
+ keys = list(cpdict)
while keys:
self.pusekey = best_match_to_list(cpv_slot, keys)
if self.pusekey:
@@ -2802,7 +2802,7 @@ class config(object):
for i, pusemask_dict in enumerate(self.pusemask_list):
cpdict = pusemask_dict.get(cp)
if cpdict:
- keys = list(cpdict.keys())
+ keys = list(cpdict)
while keys:
best_match = best_match_to_list(pkg, keys)
if best_match:
@@ -2825,7 +2825,7 @@ class config(object):
for i, puseforce_dict in enumerate(self.puseforce_list):
cpdict = puseforce_dict.get(cp)
if cpdict:
- keys = list(cpdict.keys())
+ keys = list(cpdict)
while keys:
best_match = best_match_to_list(pkg, keys)
if best_match:
@@ -3010,7 +3010,7 @@ class config(object):
if cpdict:
accept_license = list(self._accept_license)
cpv_slot = "%s:%s" % (cpv, metadata["SLOT"])
- for atom in match_to_list(cpv_slot, list(cpdict.keys())):
+ for atom in match_to_list(cpv_slot, list(cpdict)):
accept_license.extend(cpdict[atom])
licenses = set(flatten(dep.use_reduce(dep.paren_reduce(
@@ -3091,7 +3091,7 @@ class config(object):
if cpdict:
accept_properties = list(self._accept_properties)
cpv_slot = "%s:%s" % (cpv, metadata["SLOT"])
- for atom in match_to_list(cpv_slot, list(cpdict.keys())):
+ for atom in match_to_list(cpv_slot, list(cpdict)):
accept_properties.extend(cpdict[atom])
properties = set(flatten(dep.use_reduce(dep.paren_reduce(
@@ -4707,7 +4707,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",
mysettings.get("PORTAGE_QUIET", None) == "1"
digests = mydigests.get(myfile)
if digests:
- digests = list(digests.keys())
+ digests = list(digests)
digests.sort()
eout.ebegin(
"%s %s ;-)" % (myfile, " ".join(digests)))
@@ -5214,7 +5214,7 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None
writemsg(_("!!! Permission Denied: %s\n") % (e,), noiselevel=-1)
return 0
if "assume-digests" not in mysettings.features:
- distlist = list(mf.fhashdict.get("DIST", {}).keys())
+ distlist = list(mf.fhashdict.get("DIST", {}))
distlist.sort()
auto_assumed = []
for filename in distlist:
@@ -8430,9 +8430,9 @@ class FetchlistDict(portage.cache.mappings.Mapping):
self.portdb = mydbapi
def __getitem__(self, pkg_key):
"""Returns the complete fetch list for a given package."""
- return list(self.portdb.getFetchMap(pkg_key, mytree=self.mytree).keys())
+ return list(self.portdb.getFetchMap(pkg_key, mytree=self.mytree))
def __contains__(self, cpv):
- return cpv in list(self.keys())
+ return cpv in self.__iter__()
def has_key(self, pkg_key):
"""Returns true if the given package exists within pkgdir."""
return pkg_key in self
@@ -8802,7 +8802,7 @@ class MtimeDB(dict):
mtimedbkeys = set(("info", "ldpath", "resume", "resume_backup",
"starttime", "updates", "version"))
- for k in list(d.keys()):
+ for k in list(d):
if k not in mtimedbkeys:
writemsg(_("Deleting invalid mtimedb key: %s\n") % str(k))
del d[k]