summaryrefslogtreecommitdiff
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-06-09 09:10:38 -0500
committerBrian Curtin <brian@python.org>2011-06-09 09:10:38 -0500
commit95d028fd18fc33ceac8b2727a1e9fe3d4a8256b8 (patch)
tree0a5b47b33efa3507b2386bc156bbff4bab911dee /Lib/ntpath.py
parentebc991c0ce4493be276f2ea29676131b8880ec10 (diff)
downloadcpython-git-95d028fd18fc33ceac8b2727a1e9fe3d4a8256b8.tar.gz
Correction to 88e318166eaf - Issue #11583
Rather than wrapping the C _isdir function in a Python function, just import the C _isdir function directly. Additionally, add in the docstring which was left out.
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 2483ced7ff..826be87d3c 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -679,9 +679,7 @@ try:
# attribute to tell whether or not the path is a directory.
# This is overkill on Windows - just pass the path to GetFileAttributes
# and check the attribute from there.
- from nt import _isdir
+ from nt import _isdir as isdir
except ImportError:
- from genericpath import isdir as _isdir
-
-def isdir(path):
- return _isdir(path)
+ # Use genericpath.isdir as imported above.
+ pass