diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-05 01:47:20 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-05 01:47:20 -0700 |
commit | 123ed0d72aee3ba2f46dfb7e9adbb0f6367e217a (patch) | |
tree | ad6aee0e29ffe18ed56e8be489ec38f1ce96a216 /pym/portage | |
parent | 0433ac7ff26aca04633a765837051fe2ddcd82de (diff) | |
download | portage-123ed0d72aee3ba2f46dfb7e9adbb0f6367e217a.tar.gz portage-123ed0d72aee3ba2f46dfb7e9adbb0f6367e217a.tar.bz2 portage-123ed0d72aee3ba2f46dfb7e9adbb0f6367e217a.zip |
Use lazy imports for CacheError and OrderedDict in the base portage
module.
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/__init__.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index cd1ad6875..e3b3cabfa 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -57,15 +57,10 @@ except ImportError as e: try: - try: - from collections import OrderedDict - except ImportError: - from portage.cache.mappings import OrderedDict - - from portage.cache.cache_errors import CacheError import portage.proxy.lazyimport import portage.proxy as proxy proxy.lazyimport.lazyimport(globals(), + 'portage.cache.cache_errors:CacheError', 'portage.checksum', 'portage.checksum:perform_checksum,perform_md5,prelink_capable', 'portage.cvstree', @@ -133,6 +128,12 @@ try: 'portage.xpak', ) + try: + from collections import OrderedDict + except ImportError: + proxy.lazyimport.lazyimport(globals(), + 'portage.cache.mappings:OrderedDict') + import portage.const from portage.const import VDB_PATH, PRIVATE_PATH, CACHE_PATH, DEPCACHE_PATH, \ USER_CONFIG_PATH, MODULES_FILE_PATH, CUSTOM_PROFILE_PATH, PORTAGE_BASE_PATH, \ |