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.
This commit is contained in:
Brian Curtin 2011-06-09 10:00:42 -05:00
parent 5cf8660f0b
commit 5446f08c60
2 changed files with 7 additions and 6 deletions

View file

@ -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