From 594cb2691debaa7562fd7d76d3b224701ec087ea Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 3 Dec 2018 16:39:31 +0100 Subject: GUI: a few fixes, sort rc entries --- gui/api/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gui/api') 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: -- cgit v1.2.3