« Previous | Next » 

Revision 4c4e4e1e

ID4c4e4e1e82de5444dc8f9c1f6ece31be427338ae
Parent c26a6bd2
Child 6f7d4e75

Added by Iustin Pop almost 15 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 <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences