'Get rid of the lock by deleting the lockfile.
When working in a `with` statement, this gets automatically
called at the end.'

def release(self):

    if self.is_locked:
        os.close(self.fd)
        os.unlink(self.lockfile)
        self.is_locked = False
