def ismount_raw(path):
 try:
  s1 = os.lstat(path)
 except os.error as err:
  if (err.errno == errno.ENOENT):
   return False
  raise
 if stat.S_ISLNK(s1.st_mode):
  return False
 s2 = os.lstat(os.path.join(path, '..'))
 dev1 = s1.st_dev
 dev2 = s2.st_dev
 if (dev1 != dev2):
  return True
 ino1 = s1.st_ino
 ino2 = s2.st_ino
 if (ino1 == ino2):
  return True
 return False

def ismount_raw ( path ) : try : s1 = os . lstat ( path ) except os . error as err : if ( err . errno == errno . ENOENT ) : return False raise if stat . S_ISLNK ( s1 . st_mode ) : return False s2 = os . lstat ( os . path . join ( path , '..' ) ) dev1 = s1 . st_dev dev2 = s2 . st_dev if ( dev1 != dev2 ) : return True ino1 = s1 . st_ino ino2 = s2 . st_ino if ( ino1 == ino2 ) : return True return False
test whether a path is a mount point .