Revision 6956e9cd lib/luxi.py

b/lib/luxi.py
325 325
    result = data[KEY_RESULT]
326 326

  
327 327
    if not data[KEY_SUCCESS]:
328
      # TODO: decide on a standard exception
329
      if (isinstance(result, (tuple, list)) and len(result) == 2 and
330
          isinstance(result[1], (tuple, list))):
331
        # custom ganeti errors
332
        err_class = errors.GetErrorClass(result[0])
333
        if err_class is not None:
334
          raise err_class, tuple(result[1])
335

  
328
      errors.MaybeRaise(result)
336 329
      raise RequestError(result)
337 330

  
338 331
    return result

Also available in: Unified diff