def _check_owned(self):
    if not self._is_owned():
      raise RuntimeError("cannot work with un-aquired lock")
Raise an exception if the current thread doesn't own the lock.
dataset/ETHPy150Open ganeti/ganeti/lib/locking.py/_BaseCondition._check_owned