Fix RpcResult.Raise error code
authorIustin Pop <iustin@google.com>
Sat, 12 Jun 2010 00:29:01 +0000 (02:29 +0200)
committerIustin Pop <iustin@google.com>
Sun, 13 Jun 2010 21:17:19 +0000 (23:17 +0200)
A typo in the Raise() method of rpc.RpcResult means that any remote
errors will lack an appropriate error code; this will confuse e.g. RAPI
users.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

lib/rpc.py

index 6de365b..fa896c2 100644 (file)
@@ -160,7 +160,7 @@ class RpcResult(object):
     else:
       ec = errors.OpExecError
     if ecode is not None:
-      args = (msg, prereq)
+      args = (msg, ecode)
     else:
       args = (msg, )
     raise ec(*args) # pylint: disable-msg=W0142