summaryrefslogtreecommitdiffstats
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-11-30 23:31:49 (GMT)
committerGitHub <noreply@github.com>2022-11-30 23:31:49 (GMT)
commit0076ca48e9cd116bb9d283d014fe69a72c9f1f6f (patch)
tree399d85f6a34fd00420c375e8e57bb11a9f165055 /Lib/posixpath.py
parentf4511d3ee97a48d4a13e523d0892d0b62d0c491d (diff)
downloadcpython-0076ca48e9cd116bb9d283d014fe69a72c9f1f6f.zip
cpython-0076ca48e9cd116bb9d283d014fe69a72c9f1f6f.tar.gz
cpython-0076ca48e9cd116bb9d283d014fe69a72c9f1f6f.tar.bz2
gh-96192: fix os.ismount() to use a path that is str or bytes (GH-96194)
(cherry picked from commit 367f552129341796d75fc4cc40edb49405235a2b) Co-authored-by: Christoph Anton Mitterer <calestyo@scientia.org> Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r--Lib/posixpath.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index 5e1ebe3..5b4d78b 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -195,6 +195,7 @@ def ismount(path):
if stat.S_ISLNK(s1.st_mode):
return False
+ path = os.fspath(path)
if isinstance(path, bytes):
parent = join(path, b'..')
else: