def lock(self):
        """Acquire lock for dvc repo."""
        try:
            self._do_lock()
            return
        except LockError:
            time.sleep(self.TIMEOUT)

        self._do_lock()
def lock ( self ) : try : self . _do_lock ( ) return except LockError : time . sleep ( self . TIMEOUT ) self . _do_lock ( )
Acquire lock for dvc repo.