From: Zac Medico Date: Sun, 5 Sep 2010 20:14:07 +0000 (-0700) Subject: Eliminate portage.env from baseline imports. X-Git-Tag: v2.2_rc76~24 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1a6c8a3c450fa8f4d8132c3d121272af7e256574;p=portage.git Eliminate portage.env from baseline imports. --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index e3b3cabfa..3c8d5ced6 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -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', diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py index c543afd33..e51e5cd13 100644 --- a/pym/portage/dispatch_conf.py +++ b/pym/portage/dispatch_conf.py @@ -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: diff --git a/pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py b/pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py index f434573d0..3ccbb99cb 100644 --- a/pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py +++ b/pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py @@ -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', ])