Преглед изворни кода

Fix Python 3 compatibility

Yentl Van Tendeloo пре 7 година
родитељ
комит
547702e08d
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      wrappers/modelverse.py

+ 1 - 1
wrappers/modelverse.py

@@ -654,7 +654,7 @@ def service_get(port):
     """Get the values on the specified port."""
 
     data = urlencode({"op": "get_output", "taskname": port}).encode()
-    val = json.loads(urlopen(Request("http://%s" % controller.address, data), timeout=99999).read())
+    val = json.loads(urlopen(Request("http://%s" % controller.address, data), timeout=99999).read().decode('utf-8'))
     return val
 
 def service_set(port, value):