def lock(self):
        success = []
        failed = []
        try:
            result = self._lock(lock_type='update')
        except GitLockError as exc:
            failed.append(exc.strerror)
        else:
            if result is not None:
                success.append(result)
        return success, failed
Place an lock file and report on the success/failure. This is an
dataset/ETHPy150Open saltstack/salt/salt/utils/gitfs.py/GitProvider.lock