summaryrefslogtreecommitdiff
path: root/CAO/Status.py
blob: 782a0b46fffb30b81bc632492ee416ae6f9ea0e9 (plain)
1
2
3
4
5
6
7
import json

def cao_error(msg, code=255):
    return json.dumps({'type': 'response', 'content': {'status': code, 'info': msg}})

def cao_success(obj):
    return json.dumps({'type': 'response', 'content': {'status': 0, 'result': obj}})