summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-28 13:39:44 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-28 13:39:44 -0700
commit988416d6a172458d49a787f053b8e44a22830857 (patch)
tree56d7b1bac6efe8935f15699bc6fd8f25b8451070
parent27865196cb63f1b70e1368fdb7bc3893dd44dc8d (diff)
downloadportage-988416d6a172458d49a787f053b8e44a22830857.tar.gz
portage-988416d6a172458d49a787f053b8e44a22830857.tar.bz2
portage-988416d6a172458d49a787f053b8e44a22830857.zip
Bug #335055 - Fix "TypeError: argument of type 'NoneType' is not
iterable" raised from first call to VirtualsManager.get_virts_p() when trying to expand the category for a package name.
-rw-r--r--pym/portage/package/ebuild/_config/VirtualsManager.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/pym/portage/package/ebuild/_config/VirtualsManager.py b/pym/portage/package/ebuild/_config/VirtualsManager.py
index f9b947145..79b351ab4 100644
--- a/pym/portage/package/ebuild/_config/VirtualsManager.py
+++ b/pym/portage/package/ebuild/_config/VirtualsManager.py
@@ -223,10 +223,11 @@ class VirtualsManager(object):
if self._virts_p is not None:
return self._virts_p
- self._virts_p = {}
virts = self.getvirtuals()
+ virts_p = {}
for x in virts:
vkeysplit = x.split("/")
- if vkeysplit[1] not in self._virts_p:
- self._virts_p[vkeysplit[1]] = virts[x]
- return self._virts_p
+ if vkeysplit[1] not in virts_p:
+ virts_p[vkeysplit[1]] = virts[x]
+ self._virts_p = virts_p
+ return virts_p