From 0765de4d004df42a3ebec40b10b1d88155e31911 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 11 Dec 2009 03:22:40 +0000 Subject: [PATCH] Don't use lazy import for portage.cache.mappings because it's imported anyway. svn path=/main/trunk/; revision=15029 --- pym/portage/__init__.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 3819bfd32..e9c301ed4 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -67,11 +67,16 @@ except ImportError as e: raise 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.mappings:OrderedDict', 'portage.checksum', 'portage.checksum:perform_checksum,perform_md5,prelink_capable', 'portage.cvstree', @@ -133,13 +138,6 @@ except ImportError as e: sys.stderr.write(" "+str(e)+"\n\n") raise -try: - from collections import OrderedDict -except ImportError: - # lazy import is above - # from portage.cache.mappings import OrderedDict - pass - if sys.hexversion >= 0x3000000: basestring = str long = int -- 2.26.2