From: Zac Medico Date: Sun, 13 Dec 2009 03:49:17 +0000 (-0000) Subject: Don't use lazy import for portage.cache.mappings because it's imported anyway. X-Git-Tag: v2.1.7.14~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a189a31d3d7f9ed02529f6a16212445e05ac8ed0;p=portage.git Don't use lazy import for portage.cache.mappings because it's imported anyway. (trunk r15029) svn path=/main/branches/2.1.7/; revision=15063 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 0a6731bb2..b4484f5f1 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