Revision a66bd91b lib/locking.py

b/lib/locking.py
520 520
    """
521 521
    return self.__pending[0] == cond
522 522

  
523
  def __acquire_unlocked(self, shared=0, timeout=None):
523
  def __acquire_unlocked(self, shared, timeout):
524 524
    """Acquire a shared lock.
525 525

  
526 526
    @param shared: whether to acquire in shared mode; by default an
......
641 641
      acquired = self.__is_exclusive()
642 642

  
643 643
      if not acquired:
644
        acquired = self.__acquire_unlocked(timeout)
644
        acquired = self.__acquire_unlocked(0, timeout)
645

  
646
        assert self.__is_exclusive() and not self.__is_sharer(), \
647
          "Lock wasn't acquired in exclusive mode"
645 648

  
646 649
      if acquired:
647 650
        self.__deleted = True

Also available in: Unified diff