summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-06 05:04:21 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-06 05:04:21 +0000
commit99cf09fb284f03b3e85c2a5f37b3fa9a23653ec8 (patch)
tree8edccac386fb775edf39ecc5dbe288c61543614d
parent89176cd5b606cce6f093271875c565ed5a4f3bc4 (diff)
downloadportage-99cf09fb284f03b3e85c2a5f37b3fa9a23653ec8.tar.gz
portage-99cf09fb284f03b3e85c2a5f37b3fa9a23653ec8.tar.bz2
portage-99cf09fb284f03b3e85c2a5f37b3fa9a23653ec8.zip
Define __slots__ for classes derived from ObjectProxy.
svn path=/main/trunk/; revision=12769
-rw-r--r--pym/portage/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index fb6cfaf5f..83acb0fed 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -7933,6 +7933,9 @@ class _LegacyGlobalProxy(proxy.objectproxy.ObjectProxy):
Instances of these serve as proxies to global variables
that are initialized on demand.
"""
+
+ __slots__ = ('_name',)
+
def __init__(self, name):
proxy.objectproxy.ObjectProxy.__init__(self)
object.__setattr__(self, '_name', name)
@@ -7949,6 +7952,8 @@ class _PortdbProxy(proxy.objectproxy.ObjectProxy):
are needed while the portdb is not.
"""
+ __slots__ = ()
+
def _get_target(self):
init_legacy_globals()
global db, portdb, root, _portdb_initialized
@@ -7962,6 +7967,8 @@ class _MtimedbProxy(proxy.objectproxy.ObjectProxy):
The mtimedb is independent from the portdb and other globals.
"""
+ __slots__ = ('_name',)
+
def __init__(self, name):
proxy.objectproxy.ObjectProxy.__init__(self)
object.__setattr__(self, '_name', name)