diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-02 14:10:51 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-02 14:10:51 -0700 |
commit | 26447c46440f31a676a6079cc76b0ef81ff50a75 (patch) | |
tree | 345a603e4f7e15fdabcdc10188fc0ddd385ab19d /pym/portage/package/ebuild/config.py | |
parent | fcf9d2ff4f7bfa47cba7df48e3cc49f3e817d7ce (diff) | |
download | portage-26447c46440f31a676a6079cc76b0ef81ff50a75.tar.gz portage-26447c46440f31a676a6079cc76b0ef81ff50a75.tar.bz2 portage-26447c46440f31a676a6079cc76b0ef81ff50a75.zip |
Bug #335620 - Add backward compatible config.virtuals and virts_p
properties, and trigger a DeprecationWarning if they are accessed.
Diffstat (limited to 'pym/portage/package/ebuild/config.py')
-rw-r--r-- | pym/portage/package/ebuild/config.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 6ccb1da5f..22edda68e 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1977,6 +1977,20 @@ class config(object): myflags.difference_update(self.usemask) self.configlist[-1]["USE"]= " ".join(sorted(myflags)) + @property + def virts_p(self): + warnings.warn("portage config.virts_p attribute " + \ + "is deprecated, use config.get_virts_p()", + DeprecationWarning, stacklevel=2) + return self.get_virts_p() + + @property + def virtuals(self): + warnings.warn("portage config.virtuals attribute " + \ + "is deprecated, use config.getvirtuals()", + DeprecationWarning, stacklevel=2) + return self.getvirtuals() + def get_virts_p(self): return self._virtuals_manager.get_virts_p() |