[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see
Serhiy Storchaka
report at bugs.python.org
Fri Jun 3 06:06:09 EDT 2016
Serhiy Storchaka added the comment:
What if use os.stat(dirname(path)) instead of os.lstat(parent)?
- if isinstance(path, bytes):
- parent = join(path, b'..')
- else:
- parent = join(path, '..')
try:
- s2 = os.lstat(parent)
+ s2 = os.stat(dirname(path))
except OSError:
return False
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2466>
_______________________________________
More information about the Python-bugs-list
mailing list