Commit 2c0f74f2 authored by Iustin Pop's avatar Iustin Pop
Browse files

RpcResult: simplify some asserts



data ≫ code, eom.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 4c3ac53a
......@@ -226,12 +226,9 @@ class RpcResult(object):
self.fail_msg = None
self.payload = data[1]
assert hasattr(self, "call")
assert hasattr(self, "data")
assert hasattr(self, "fail_msg")
assert hasattr(self, "node")
assert hasattr(self, "offline")
assert hasattr(self, "payload")
for attr_name in ["call", "data", "fail_msg",
"node", "offline", "payload"]:
assert hasattr(self, attr_name), "Missing attribute %s" % attr_name
@staticmethod
def _EnsureErr(val):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment