Eliminate portage.env from baseline imports.
authorZac Medico <zmedico@gentoo.org>
Sun, 5 Sep 2010 20:14:07 +0000 (13:14 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 5 Sep 2010 20:14:07 +0000 (13:14 -0700)
pym/portage/__init__.py
pym/portage/dispatch_conf.py
pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py

index e3b3cabfa97858b30d97776e75fe470bd780f7d2..3c8d5ced609bbc7f2dba566ce3932443a1957225 100644 (file)
@@ -81,7 +81,6 @@ try:
                        'match_from_list,match_to_list',
                'portage.dep.dep_check:dep_check,dep_eval,dep_wordreduce,dep_zapdeps',
                'portage.eclass_cache',
-               'portage.env.loaders',
                'portage.exception',
                'portage.getbinpkg',
                'portage.locks',
index c543afd33eed20939090badde14b748983fc0c3e..e51e5cd138760bef51521f7c734542a6b9cd7906 100644 (file)
@@ -15,6 +15,7 @@ except ImportError:
     from commands import getstatusoutput as subprocess_getstatusoutput
 
 import portage
+from portage.env.loaders import KeyValuePairFileLoader
 from portage.localization import _
 
 RCS_BRANCH = '1.1.1'
@@ -41,7 +42,7 @@ def diffstatusoutput_len(cmd):
         return (1, 1)
 
 def read_config(mandatory_opts):
-    loader = portage.env.loaders.KeyValuePairFileLoader(
+    loader = KeyValuePairFileLoader(
         '/etc/dispatch-conf.conf', None)
     opts, errors = loader.load()
     if not opts:
index f434573d059908c109706bd231f4bac494ecde85..3ccbb99cbb8671e2d2c0ab25d0ca61bff8c50ec7 100644 (file)
@@ -15,7 +15,7 @@ class LazyImportPortageBaselineTestCase(TestCase):
        _module_re = re.compile(r'^(portage|repoman|_emerge)\.')
 
        _baseline_imports = frozenset([
-               'portage.const', 'portage.env', 'portage.localization',
+               'portage.const', 'portage.localization',
                'portage.proxy', 'portage.proxy.lazyimport',
                'portage.proxy.objectproxy', 'portage._ensure_encodings',
        ])