diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-03 16:39:31 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-12-03 16:39:31 +0100 |
commit | 594cb2691debaa7562fd7d76d3b224701ec087ea (patch) | |
tree | c2e3668ca4e9180c125cc2432a9037b2460de83c /gui/api | |
parent | 878923ab610af66789531937278ed1aa58f1ebd7 (diff) | |
download | dabmod-594cb2691debaa7562fd7d76d3b224701ec087ea.tar.gz dabmod-594cb2691debaa7562fd7d76d3b224701ec087ea.tar.bz2 dabmod-594cb2691debaa7562fd7d76d3b224701ec087ea.zip |
GUI: a few fixes, sort rc entries
Diffstat (limited to 'gui/api')
-rwxr-xr-x | gui/api/__init__.py | 3 |
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: |