diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-06-26 05:28:04 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-06-26 05:28:04 +0000 |
commit | 166d53b931cbfa71fa63d732075737bd0012a90b (patch) | |
tree | b11d8bb5e4053a0139d9fbcef2c4589521880e28 /pym/portage_exception.py | |
parent | 9a58611323e313a7a5d48fa65a316a3ffedc3954 (diff) | |
download | portage-166d53b931cbfa71fa63d732075737bd0012a90b.tar.gz portage-166d53b931cbfa71fa63d732075737bd0012a90b.tar.bz2 portage-166d53b931cbfa71fa63d732075737bd0012a90b.zip |
Implement lazy initialization of global "portdb", "settings" and other
variables that pollute the portage module. This works by initializing
the global variables with dummy "proxy" objects that serve as a means
to trigger lazy initialization. As soon as the first attribute access
or method call occurs on one of the proxy objects, it causes all the
proxy objects to be replaced with the real ones.
It's possible for an unsupported attribute access or method call on a
proxy object to trigger an error, leading to breakage. However, hopefully
these such corner cases will negligible (only time will tell).
svn path=/main/trunk/; revision=10798
Diffstat (limited to 'pym/portage_exception.py')
0 files changed, 0 insertions, 0 deletions