Is there a pythonic way and without shell commands (i.e. with subprocess module) to check if a directory is a mount point?
Up to now I use:
import os
import subprocess
def is_mount_point(dir_path):
try:
check_output([
'mountpoint',
path.realpath(dir_name)
])
return True
except CalledProcessError:
return False