Revision ff20190d

b/lib/uidpool.py
323 323
def ReleaseUid(uid):
324 324
  """This should be called when the given user-id is no longer in use.
325 325

  
326
  @type uid: LockedUid or integer
327
  @param uid: the uid to release back to the pool
328

  
326 329
  """
327
  # Make sure we release the exclusive lock, if there is any
328
  uid.Unlock()
330
  if isinstance(uid, LockedUid):
331
    # Make sure we release the exclusive lock, if there is any
332
    uid.Unlock()
329 333
  try:
330 334
    uid_path = utils.PathJoin(constants.UIDPOOL_LOCKDIR, str(uid))
331 335
    os.remove(uid_path)

Also available in: Unified diff