diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-10-18 03:19:36 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-10-18 03:19:36 +0000 |
commit | 20f4557207c9d63cbc46164e4b40aff9f4d7d7ca (patch) | |
tree | 749d90dd20071d18c2ff982a20118d4761b49cfd /pym/_emerge/BlockerCache.py | |
parent | f8f669a2a11308ffeec719d7ec38b6e90314d77c (diff) | |
download | portage-20f4557207c9d63cbc46164e4b40aff9f4d7d7ca.tar.gz portage-20f4557207c9d63cbc46164e4b40aff9f4d7d7ca.tar.bz2 portage-20f4557207c9d63cbc46164e4b40aff9f4d7d7ca.zip |
Implement __len__. (trunk r14598)
svn path=/main/branches/2.1.7/; revision=14633
Diffstat (limited to 'pym/_emerge/BlockerCache.py')
-rw-r--r-- | pym/_emerge/BlockerCache.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pym/_emerge/BlockerCache.py b/pym/_emerge/BlockerCache.py index f88a7c43f..de3b65e22 100644 --- a/pym/_emerge/BlockerCache.py +++ b/pym/_emerge/BlockerCache.py @@ -165,6 +165,11 @@ class BlockerCache(portage.cache.mappings.MutableMapping): return iter([]) return iter(self._cache_data["blockers"]) + def __len__(self): + """This needs to be implemented in order to avoid + infinite recursion in some cases.""" + return len(self._cache_data["blockers"]) + def __delitem__(self, cpv): del self._cache_data["blockers"][cpv] |