From 1a6c8a3c450fa8f4d8132c3d121272af7e256574 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 5 Sep 2010 13:14:07 -0700 Subject: [PATCH] Eliminate portage.env from baseline imports. --- pym/portage/__init__.py | 1 - pym/portage/dispatch_conf.py | 3 ++- .../tests/lazyimport/test_lazy_import_portage_baseline.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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', ]) -- 2.26.2