From: Zac Medico Date: Thu, 2 Sep 2010 21:33:48 +0000 (-0700) Subject: Add backward compatible config.pmaskdict and punmaskdict properties X-Git-Tag: v2.2_rc74~1 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=1a5b8fb93bdd150b3e6525c1706e1ba0e34e15d9;p=portage.git Add backward compatible config.pmaskdict and punmaskdict properties that return copies of the corresponding MaskManager attributes. This is safe since MaskManager now stores the values in these dicts as immutable tuples. --- diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 22edda68e..2f0958e2d 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -853,6 +853,14 @@ class config(object): writemsg("!!! %s\n" % str(e), noiselevel=-1) + @property + def pmaskdict(self): + return self._mask_manager._pmaskdict.copy() + + @property + def punmaskdict(self): + return self._mask_manager._punmaskdict.copy() + def expandLicenseTokens(self, tokens): """ Take a token from ACCEPT_LICENSE or package.license and expand it if it's a group token (indicated by @) or just return it if it's not a