

def check_mount(root, drive):
    '\n    Verify that the path to the device is a mount point and mounted.  This\n    allows us to fast fail on drives that have been unmounted because of\n    issues, and also prevents us for accidentally filling up the root\n    partition.\n\n    :param root:  base path where the devices are mounted\n    :param drive: drive name to be checked\n    :returns: True if it is a valid mounted device, False otherwise\n    '
    if (not (urllib.parse.quote_plus(drive) == drive)):
        return False
    path = os.path.join(drive, drive)
    return utils.ismount(path)

dataset/ETHPy150Open openstack/swift/swift/common/constraints.py check_mount/VarMisuse@45/219 `root`->`drive`