« Previous | Next » 

Revision 4c4e4e1e


Added by Iustin Pop almost 13 years ago

Simplify RPC call result check in cmdlib.py

Now that all results are the same, we can even more simplify the
handling in cmdlib more. Almost all if result.RemoteFailMsg()…
constructs are similar, and we resurect the RpcResult.Raise() function
to take a message argument, which it will process and raise an
appropriate exception.

This means a significant reduce in boilerplate code. Only the cases
which handle the error specially (e.g. by warning only) need to touch
directly the failure message, which was renamed on the RpcResult object
for more clarity.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences