From: Zac Medico Date: Tue, 11 Aug 2009 20:54:12 +0000 (-0000) Subject: Temporarily delete the os and shutil imports, to ensure that only the X-Git-Tag: v2.2_rc39~107 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2e9112e43f05b9ddd62c56e1d31142c1dc581928;p=portage.git 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 --- 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: