summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMagnus Feuer <mfeuer@jaguarlandrover.com>2015-09-23 11:23:09 -0700
committerMagnus Feuer <mfeuer@jaguarlandrover.com>2015-09-23 11:23:09 -0700
commit29365b45d1911d42cae9ca7fb9f05829d77c4bb7 (patch)
tree0cea8149f8958bd2a4c6d4fac723e36e681349ce /python
parentfd8d8205b265abde7639bdbe6c1bdc16a0ecd662 (diff)
downloadrvi_core-29365b45d1911d42cae9ca7fb9f05829d77c4bb7.tar.gz
mfeuer_json_params: Fixed rvilib to parse JSON object instead of array of single-element objects
Diffstat (limited to 'python')
-rw-r--r--python/rvilib.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/python/rvilib.py b/python/rvilib.py
index e790481..f0c30e5 100644
--- a/python/rvilib.py
+++ b/python/rvilib.py
@@ -176,16 +176,11 @@ class RVI(SimpleJSONRPCServer):
# a regular dictionary: {'vin': 1234, hello: 'world'}
# print "Parameters:", params['parameters']
- msg_params = params['parameters']
- for i in range(0, len(msg_params)):
- for j in range(0, len(msg_params[i].keys())):
- # print "params", msg_params[i].keys()[j], "=", msg_params[i].values()[j]
- dict_param[msg_params[i].keys()[j]] = msg_params[i].values()[j]
# print "Parameter disctionary: ", dict_param
# print
# Ship the processed dispatch info upward.
- return SimpleJSONRPCServer._dispatch(self, params['service_name'], dict_param)
+ return SimpleJSONRPCServer._dispatch(self, params['service_name'], params['parameters'])
# Fallthrough to all other methods.
# Will handle service_re3