def upgrade(self):
        try:
            fcntl.lockf(self.fd, fcntl.LOCK_EX)
        # Python 3.2 raises IOError, Python3.3+ raises OSError
        except (__HOLE__, OSError):
            raise self.WriteLockFailed(self.path)
        self.is_exclusive = True
dataset/ETHPy150Open jborg/attic/attic/helpers.py/UpgradableLock.upgrade