diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-08-11 20:54:12 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-08-11 20:54:12 +0000 |
commit | 2e9112e43f05b9ddd62c56e1d31142c1dc581928 (patch) | |
tree | 0a3aec3220ac9c9ebc9d8ff455d98e0a66452733 | |
parent | bf5896ab6449da9f8d3026dd0c3a086a58a3b454 (diff) | |
download | portage-2e9112e43f05b9ddd62c56e1d31142c1dc581928.tar.gz portage-2e9112e43f05b9ddd62c56e1d31142c1dc581928.tar.bz2 portage-2e9112e43f05b9ddd62c56e1d31142c1dc581928.zip |
Temporarily delete the os and shutil imports, to ensure that only the
wrapped versions are imported by portage internals.
svn path=/main/trunk/; revision=13998
-rw-r--r-- | pym/portage/__init__.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 0d819393a..efb5ce79c 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -19,9 +19,7 @@ try: # ESTALE may not be defined on some systems, such as interix. errno.ESTALE = -1 import logging - import os import re - import shutil import time import types try: @@ -36,6 +34,14 @@ try: from itertools import chain, izip import platform import warnings + + # Temporarily delete these imports, to ensure that only the + # wrapped versions are imported by portage internals. + import os + del os + import shutil + del shutil + except ImportError, e: sys.stderr.write("\n\n") sys.stderr.write("!!! Failed to complete python imports. These are internal modules for\n") @@ -175,7 +181,9 @@ if sys.hexversion >= 0x3000000: def _unicode_module_wrapper(mod): return mod +import os os = _unicode_module_wrapper(os) +import shutil shutil = _unicode_module_wrapper(shutil) try: |