summaryrefslogtreecommitdiffstats
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2011-06-09 15:00:42 (GMT)
committerBrian Curtin <brian@python.org>2011-06-09 15:00:42 (GMT)
commit5446f08c608d8e0041c8bb27b74be713db050177 (patch)
tree0f834bf1c641b1e2a6c3ccffa29378d12523734b /Lib/ntpath.py
parent5cf8660f0bd8ce16b0e9f5c95049966b653e6574 (diff)
downloadcpython-5446f08c608d8e0041c8bb27b74be713db050177.zip
cpython-5446f08c608d8e0041c8bb27b74be713db050177.tar.gz
cpython-5446f08c608d8e0041c8bb27b74be713db050177.tar.bz2
Correction to f1509fc75435 - 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 e121262..4f8f423 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -527,9 +527,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