Skip to content
  • Iustin Pop's avatar
    Simplify RPC call result check in cmdlib.py · 4c4e4e1e
    Iustin Pop authored
    
    
    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: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
    4c4e4e1e