diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index ec92d6b83..08d8f4152 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -8608,6 +8608,11 @@ class FetchlistDict(portage.cache.mappings.Mapping): def __iter__(self): return iter(self.portdb.cp_list(self.cp, mytree=self.mytree)) + def __len__(self): + """This needs to be implemented in order to avoid + infinite recursion in some cases.""" + return len(self.portdb.cp_list(self.cp, mytree=self.mytree)) + def keys(self): """Returns keys for all packages within pkgdir""" return self.portdb.cp_list(self.cp, mytree=self.mytree) |