summaryrefslogtreecommitdiffstats
path: root/gui/api/__init__.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-03 16:39:31 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-03 16:39:31 +0100
commit594cb2691debaa7562fd7d76d3b224701ec087ea (patch)
treec2e3668ca4e9180c125cc2432a9037b2460de83c /gui/api/__init__.py
parent878923ab610af66789531937278ed1aa58f1ebd7 (diff)
downloaddabmod-594cb2691debaa7562fd7d76d3b224701ec087ea.tar.gz
dabmod-594cb2691debaa7562fd7d76d3b224701ec087ea.tar.bz2
dabmod-594cb2691debaa7562fd7d76d3b224701ec087ea.zip
GUI: a few fixes, sort rc entries
Diffstat (limited to 'gui/api/__init__.py')
-rwxr-xr-xgui/api/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/api/__init__.py b/gui/api/__init__.py
index 70a4eff..77faa10 100755
--- a/gui/api/__init__.py
+++ b/gui/api/__init__.py
@@ -23,6 +23,7 @@
import cherrypy
from cherrypy.lib.httputil import parse_query_string
+import json
import urllib
import os
@@ -88,7 +89,7 @@ class API:
if cherrypy.request.method == 'POST':
cl = cherrypy.request.headers['Content-Length']
rawbody = cherrypy.request.body.read(int(cl))
- params = json.loads(rawbody)
+ params = json.loads(rawbody.decode())
try:
self.mod_rc.set_param_value(params['controllable'], params['param'], params['value'])
except ValueError as e: