MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / communicate_command

Method communicate_command

unit-tests/helper.py:20–39  ·  view source on GitHub ↗
(_, request)

Source from the content-addressed store, hash-verified

18
19 @staticmethod
20 def communicate_command(_, request):
21 # type: (any, dict) -> dict
22 rs = {
23 'result': 'success',
24 'result_code': '',
25 'message': ''
26 }
27 action = KeeperApiHelper._expected_commands.pop(0)
28
29 if callable(action):
30 props = action(request)
31 if type(props) == dict:
32 rs.update(props)
33 return rs
34
35 if type(action) == str:
36 if action == request['command']:
37 return rs
38
39 raise Exception()

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected