def METHOD_NAME(fd, operation):
    """
    Try flock() but ignore ``ENOLCK`` errors, which could happen if the
    file system does not support locking.
    """
    try:
        flock(fd, operation)
    except IOError as e:
        if e.errno != ENOLCK:
            raise