Skip to content

Commit b24bf6b

Browse files
committed
os.path.ismount(): Put unexpected behaviour into docstring.
Adds the mininum of unexpected behaviour of ismount() to the docstring, so that is appears while using help() or pydoc.
1 parent eb53645 commit b24bf6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/posixpath.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ def dirname(p):
188188
# (Does this work for all UNIXes? Is it even guaranteed to work by Posix?)
189189

190190
def ismount(path):
191-
"""Test whether a path is a mount point"""
191+
"""Test whether a path is a mount point. Does not work reliably
192+
with bind mounts on the same filesystems, has false positives for
193+
btrfs subvolumes that aren't a mountpoint."""
192194
try:
193195
s1 = os.lstat(path)
194196
except (OSError, ValueError):

0 commit comments

Comments
 (0)