From 3d836c372d7eff1e2b507888f1ff652a30187c54 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 26 May 2018 18:25:21 +0200 Subject: checking on RPC status and sending it thru --- test/module/test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/module') diff --git a/test/module/test.py b/test/module/test.py index 9146c14..b9e7059 100755 --- a/test/module/test.py +++ b/test/module/test.py @@ -1,7 +1,8 @@ import importlib.util -spec = importlib.util.spec_from_file_location("module.name", "../../rpc/__main__.py") -CortexRPC = importlib.util.module_from_spec(spec) -spec.loader.exec_module(CortexRPC) +spec = importlib.util.spec_from_file_location("CortexRPC", "../../rpc/rpc.py") +rpc_module = importlib.util.module_from_spec(spec) +spec.loader.exec_module(rpc_module) +CortexRPC = rpc_module.CortexRPC if __name__ == '__main__': def get_params(key, value): @@ -10,7 +11,7 @@ if __name__ == '__main__': def set_param(key, value): print('log param. {}: {}'.format(key, value)) return 'ok' - def ready: + def ready(key): return 'ready' def process_cmd(cmd, payload): print('process command', cmd, payload) -- cgit v1.2.3-70-g09d2