def _CheckLocksEnabled(self):
    if not self._enable_locks:
      raise errors.ProgrammerError("Attempted to use disabled locks")
Checks if locking is enabled.
dataset/ETHPy150Open ganeti/ganeti/lib/mcpu.py/Processor._CheckLocksEnabled