summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/__init__.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-01-27 00:03:52 (GMT)
committerBrett Cannon <brett@python.org>2012-01-27 00:03:52 (GMT)
commit51d14f8e565cd82a4efb6c18b7fdf29eddcca878 (patch)
tree9a146ef6ba3cdb1e1ed71cfa1b2d2fae8c406329 /Lib/importlib/__init__.py
parente9cd900585d44b418b2a2235a7eec6e4b362798f (diff)
downloadcpython-51d14f8e565cd82a4efb6c18b7fdf29eddcca878.zip
cpython-51d14f8e565cd82a4efb6c18b7fdf29eddcca878.tar.gz
cpython-51d14f8e565cd82a4efb6c18b7fdf29eddcca878.tar.bz2
Relocate importlib._case_ok to importlib._bootstrap.
This required updating the code to use posix instead of os. This is all being done to make bootstrapping easier to removing dependencies that are kept in importlib.__init__ and thus outside of the single file to bootstrap from.
Diffstat (limited to 'Lib/importlib/__init__.py')
-rw-r--r--Lib/importlib/__init__.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/Lib/importlib/__init__.py b/Lib/importlib/__init__.py
index 9672b36..ec6a965 100644
--- a/Lib/importlib/__init__.py
+++ b/Lib/importlib/__init__.py
@@ -33,25 +33,6 @@ _r_long = _bootstrap._r_long
# Bootstrap help #####################################################
-# TODO: Expose from import.c, else handle encode/decode as _os.environ returns
-# bytes.
-def _case_ok(directory, check):
- """Check if the directory contains something matching 'check'.
-
- No check is done if the file/directory exists or not.
-
- """
- if 'PYTHONCASEOK' in os.environ:
- return True
- if not directory:
- directory = os.getcwd()
- if check in os.listdir(directory):
- return True
- return False
-
-_bootstrap._case_ok = _case_ok
-
-
# Required built-in modules.
try:
import posix as _os