gh-96192: fix os.ismount() to use a path that is str or bytes (#96194)

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>
This commit is contained in:
Christoph Anton Mitterer 2022-11-14 05:12:32 +01:00 committed by GitHub
parent 1455c516fc
commit 367f552129
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

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