blocker_atoms = InternalPackageSet(initial_atoms=blocker_atoms)
for inst_pkg in installed_pkgs:
try:
- blocker_atoms.iterAtomsForPackage(inst_pkg).next()
+ next(blocker_atoms.iterAtomsForPackage(inst_pkg))
except (portage.exception.InvalidDependString, StopIteration):
continue
blocking_pkgs.add(inst_pkg)
"""
while self._can_add_job():
try:
- metadata_process = self._process_iter.next()
+ metadata_process = next(self._process_iter)
except StopIteration:
return False
myarg = None
if dep.root == self._frozen_config.target_root:
try:
- myarg = self._iter_atoms_for_pkg(dep_pkg).next()
+ myarg = next(self._iter_atoms_for_pkg(dep_pkg))
except StopIteration:
pass
except portage.exception.InvalidDependString:
installed_cp_set = non_virtual_cps
if len(expanded_atoms) > 1 and len(installed_cp_set) == 1:
- installed_cp = iter(installed_cp_set).next()
+ installed_cp = next(iter(installed_cp_set))
expanded_atoms = [atom for atom in expanded_atoms \
if atom.cp == installed_cp]
myarg = None
if root == self._frozen_config.target_root:
try:
- myarg = self._iter_atoms_for_pkg(pkg).next()
+ myarg = next(self._iter_atoms_for_pkg(pkg))
except StopIteration:
pass
except portage.exception.InvalidDependString:
def _visible(self, pkg):
if pkg.installed and "selective" not in self._depgraph._dynamic_config.myparams:
try:
- arg = self._depgraph._iter_atoms_for_pkg(pkg).next()
+ arg = next(self._depgraph._iter_atoms_for_pkg(pkg))
except (StopIteration, portage.exception.InvalidDependString):
arg = None
if arg:
selected = d["selected"]
if not selected:
continue
- cp = portage.cpv_getkey(iter(selected).next())
+ cp = portage.cpv_getkey(next(iter(selected)))
cp_dict = unordered.get(cp)
if cp_dict is None:
cp_dict = {}
if mytype == "selected":
continue
mylist.difference_update(all_selected)
- cp = portage.cpv_getkey(iter(selected).next())
+ cp = portage.cpv_getkey(next(iter(selected)))
for y in localtree.dep_match(cp):
if y not in pkgmap[x]["omitted"] and \
y not in pkgmap[x]["selected"] and \
def popitem(self):
try:
- k, v = iter(self.items()).next()
+ k, v = next(iter(self.items()))
except StopIteration:
raise KeyError('container is empty')
del self[k]
def popitem(self):
try:
- k, v = iter(self.items()).next()
+ k, v = next(iter(self.items()))
except StopIteration:
raise KeyError('container is empty')
del self[k]
if mydep != mykey:
cpv_iter = self._iter_match(mydep, cpv_iter)
try:
- myval = cpv_iter.next()
+ myval = next(cpv_iter)
except StopIteration:
myval = ""
for x in i:
if isinstance(x, basestring):
if x == '||':
- x = self._zap_parens(i.next(), [], disjunction=True)
+ x = self._zap_parens(next(i), [], disjunction=True)
if len(x) == 1:
dest.append(x[0])
else:
dest.append(x)
elif x.endswith("?"):
dest.append(x)
- dest.append(self._zap_parens(i.next(), []))
+ dest.append(self._zap_parens(next(i), []))
else:
dest.append(x)
else: