diff --git a/opt/ahenk/base/command/commander.py b/opt/ahenk/base/command/commander.py index eb45b57..1a74287 100644 --- a/opt/ahenk/base/command/commander.py +++ b/opt/ahenk/base/command/commander.py @@ -127,7 +127,11 @@ class Commander(object): print('Wrong or missing parameter. Usage: send -p -c -m|-f | -e|-s|-w') return None - data['message'] = ast.literal_eval(str(response)) + resp = str(response).replace("\"{", "{") + resp = resp.replace("}\"", "}") + resp = resp.replace("'", "\"") + data['message'] = json.loads(resp) + # data['message'] = ast.literal_eval(str(response)) else: print('Wrong or missing parameter. Usage : %s start|stop|restart|status|clean|send')