When issuing a provider.cmd('broadcast',...), the return will be a list of dict, whereas provider's _send_request expects a dict with relevant keys. This causes the service originating the cmd to crash. However, broadcasts in the code should be designed to not check retcodes of their action.
A higher-level fix could be implemented in service's send_request, but this would interfere with the command-line ability to get and check broadcast responses. This may be desired behavior, as in the case of broadcast.ping:
This fix is very case-specific. It will not catch generic returns of lists (none are expected), but only the specific case of a broadcast; it will ignore the broadcast return even if it consists of only a single valid dict.
Related to issue #21.
When issuing a provider.cmd('broadcast',...), the return will be a list of dict, whereas provider's
_send_request
expects a dict with relevant keys. This causes the service originating the cmd to crash. However, broadcasts in the code should be designed to not check retcodes of their action.A higher-level fix could be implemented in service's
send_request
, but this would interfere with the command-line ability to get and check broadcast responses. This may be desired behavior, as in the case ofbroadcast.ping
:This fix is very case-specific. It will not catch generic returns of lists (none are expected), but only the specific case of a broadcast; it will ignore the broadcast return even if it consists of only a single valid dict.