def lock(file, flags):
        try:
            fcntl.flock(_getfd(file), flags)
        except __HOLE__, exc_value:
            #  IOError: [Errno 11] Resource temporarily unavailable
            if exc_value[0] == 11:
                raise LockException(LockException.LOCK_FAILED, exc_value[1])
            else:
                raise
dataset/ETHPy150Open harryliu/edwin/edwinServer/site_packages/ConcurrentLogHandler084/portalocker.py/lock