Fixed AttributeError handling in rpc dispatcher
Exception handling is failing to catch an AttributeError exception. Code snippet is replaced here by an equivalent approach using a built-in python function. The message always comes coupled with another error message. It is an artifact of the appfwk and provides no information about the root cause or how to debug it. Should be removed to avoid confusion. Test Plan: PASS Following steps to reproduce the message no longer trigger it. Closes-Bug: 1991701 Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com> Change-Id: Ia37cf4c5340b58e7f318683669eaf35871558134
This commit is contained in:
parent
2f1d2d8147
commit
015df527fe
|
@ -147,18 +147,18 @@ class RpcDispatcher(object):
|
|||
had_compatible = False
|
||||
for proxyobj in self.callbacks:
|
||||
# Check for namespace compatibility
|
||||
try:
|
||||
if hasattr(proxyobj, "RPC_API_NAMESPACE"):
|
||||
cb_namespace = proxyobj.RPC_API_NAMESPACE
|
||||
except AttributeError:
|
||||
else:
|
||||
cb_namespace = None
|
||||
|
||||
if namespace != cb_namespace:
|
||||
continue
|
||||
|
||||
# Check for version compatibility
|
||||
try:
|
||||
if hasattr(proxyobj, "RPC_API_VERSION"):
|
||||
rpc_api_version = proxyobj.RPC_API_VERSION
|
||||
except AttributeError:
|
||||
else:
|
||||
rpc_api_version = '1.0'
|
||||
|
||||
is_compatible = rpc_common.version_is_compatible(rpc_api_version,
|
||||
|
|
Loading…
Reference in New Issue