diff options
Diffstat (limited to 'CAO_Status.py')
-rw-r--r-- | CAO_Status.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CAO_Status.py b/CAO_Status.py new file mode 100644 index 0000000..813fcf0 --- /dev/null +++ b/CAO_Status.py @@ -0,0 +1,7 @@ +import json + +def cao_error(msg, code=255): + return json.dumps({'status': code, 'info': msg}) + +def cao_success(obj): + return json.dumps({'status': 0, 'result': obj}) |