diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-01-30 23:46:45 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-01-30 23:46:45 -0800 |
commit | a074dc39f5bef8285035b739671fc32910fff733 (patch) | |
tree | c35e8a54bc17568edbe61009f3ef0a7c329a8a72 /pym/portage | |
parent | 524630d15e9a8ab4cdba61a775dc15c4f70d88fb (diff) | |
download | portage-a074dc39f5bef8285035b739671fc32910fff733.tar.gz portage-a074dc39f5bef8285035b739671fc32910fff733.tar.bz2 portage-a074dc39f5bef8285035b739671fc32910fff733.zip |
ebuild_xattr: lazily import xattr
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/cache/ebuild_xattr.py | 6 | ||||
-rw-r--r-- | pym/portage/tests/lint/test_import_modules.py | 1 |
2 files changed, 4 insertions, 3 deletions
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): |