Revision 83f2d5f6

b/lib/locking.py
247 247
      self._write_fd = None
248 248
    self._poller = None
249 249

  
250
  def wait(self, timeout=None):
250
  def wait(self, timeout):
251 251
    """Wait for a notification.
252 252

  
253 253
    @type timeout: float or None
......
314 314
    self._waiters = set()
315 315
    self._single_condition = self._single_condition_class(self._lock)
316 316

  
317
  def wait(self, timeout=None):
317
  def wait(self, timeout):
318 318
    """Wait for a notification.
319 319

  
320 320
    @type timeout: float or None
b/test/ganeti.locking_unittest.py
99 99

  
100 100
  def _testAcquireRelease(self):
101 101
    self.assertFalse(self.cond._is_owned())
102
    self.assertRaises(RuntimeError, self.cond.wait)
102
    self.assertRaises(RuntimeError, self.cond.wait, None)
103 103
    self.assertRaises(RuntimeError, self.cond.notifyAll)
104 104

  
105 105
    self.cond.acquire()
......
109 109
    self.cond.release()
110 110

  
111 111
    self.assertFalse(self.cond._is_owned())
112
    self.assertRaises(RuntimeError, self.cond.wait)
112
    self.assertRaises(RuntimeError, self.cond.wait, None)
113 113
    self.assertRaises(RuntimeError, self.cond.notifyAll)
114 114

  
115 115
  def _testNotification(self):
......
125 125
    self._addThread(target=_NotifyAll)
126 126
    self.assertEqual(self.done.get(True, 1), "NE")
127 127
    self.assertRaises(Queue.Empty, self.done.get_nowait)
128
    self.cond.wait()
128
    self.cond.wait(None)
129 129
    self.assertEqual(self.done.get(True, 1), "NA")
130 130
    self.assertEqual(self.done.get(True, 1), "NN")
131 131
    self.assert_(self.cond._is_owned())
......
154 154
  def testNoNotifyReuse(self):
155 155
    self.cond.acquire()
156 156
    self.cond.notifyAll()
157
    self.assertRaises(RuntimeError, self.cond.wait)
157
    self.assertRaises(RuntimeError, self.cond.wait, None)
158 158
    self.assertRaises(RuntimeError, self.cond.notifyAll)
159 159
    self.cond.release()
160 160

  
......
220 220
    def _BlockingWait():
221 221
      self.cond.acquire()
222 222
      self.done.put("A")
223
      self.cond.wait()
223
      self.cond.wait(None)
224 224
      self.cond.release()
225 225
      self.done.put("W")
226 226

  

Also available in: Unified diff