_pkg_str: add cpv attribute for match_from_list
authorZac Medico <zmedico@gentoo.org>
Sat, 12 May 2012 22:57:03 +0000 (15:57 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 12 May 2012 22:57:03 +0000 (15:57 -0700)
pym/portage/versions.py

index de2fe709ffd1be3d9ec063fdb76d28b7832e879e..ea8d5ae57f3e1b7e3d3fd58f863f1787cc1e235d 100644 (file)
@@ -351,6 +351,8 @@ class _pkg_str(_unicode):
                if self.cpv_split is None:
                        raise InvalidData(cpv)
                self.__dict__['cp'] = self.cpv_split[0] + '/' + self.cpv_split[1]
+               # for match_from_list introspection
+               self.__dict__['cpv'] = self
 
        def __setattr__(self, name, value):
                raise AttributeError("_pkg_str instances are immutable",