From: Zac Medico Date: Mon, 31 Jan 2011 07:46:45 +0000 (-0800) Subject: ebuild_xattr: lazily import xattr X-Git-Tag: v2.2.0_alpha20~58 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a074dc39f5bef8285035b739671fc32910fff733;p=portage.git ebuild_xattr: lazily import xattr --- diff --git a/pym/portage/cache/ebuild_xattr.py b/pym/portage/cache/ebuild_xattr.py index e55ac3e31..1d7e26f90 100644 --- a/pym/portage/cache/ebuild_xattr.py +++ b/pym/portage/cache/ebuild_xattr.py @@ -1,17 +1,19 @@ -# Copyright: 2009-2010 Gentoo Foundation +# Copyright: 2009-2011 Gentoo Foundation # Author(s): Petteri Räty (betelgeuse@gentoo.org) # License: GPL2 __all__ = ['database'] +import portage from portage.cache import fs_template from portage.versions import catsplit from portage import cpv_getkey from portage import os from portage import _encodings from portage import _unicode_decode -import xattr from errno import ENODATA,ENOSPC,E2BIG +portage.proxy.lazyimport.lazyimport(globals(), + 'xattr') class NoValueException(Exception): pass diff --git a/pym/portage/tests/lint/test_import_modules.py b/pym/portage/tests/lint/test_import_modules.py index c0551c7be..87bb4bf07 100644 --- a/pym/portage/tests/lint/test_import_modules.py +++ b/pym/portage/tests/lint/test_import_modules.py @@ -11,7 +11,6 @@ class ImportModulesTestCase(TestCase): def testImportModules(self): expected_failures = frozenset(( - "portage.cache.ebuild_xattr", #automagic dep on xattr )) for mod in self._list_modules(PORTAGE_PYM_PATH):