|
@@ -47,8 +47,8 @@ except IndexError:
|
|
|
|
|
|
# If task doesn't exist yet, we create it
|
|
|
|
|
|
-url = urlencode({"op": "set_input", "value": '"%s"' % taskname, "taskname": "task_manager"})
|
|
|
-urlopen(Request(address, url.encode())).read()
|
|
|
+data = urlencode({"op": "set_input", "value": '"%s"' % taskname, "taskname": "task_manager"})
|
|
|
+urlopen(Request(address, data.encode())).read()
|
|
|
|
|
|
|
|
|
|
|
@@ -60,7 +60,8 @@ local_print("To quit: execute command 'quit'")
|
|
|
|
|
|
def print_output():
|
|
|
while 1:
|
|
|
- output = urlopen(Request(address, urlencode({"op": "get_output", "taskname": taskname}))).read()
|
|
|
+ data = urlencode({"op": "get_output", "taskname": taskname})
|
|
|
+ output = urlopen(Request(address, data.encode())).read()
|
|
|
remote_print("%s" % str(json.loads(output)))
|
|
|
|
|
|
thrd = threading.Thread(target=print_output)
|
|
@@ -126,4 +127,5 @@ while 1:
|
|
|
else:
|
|
|
command = '"%s"' % command
|
|
|
|
|
|
- urlopen(Request(address, urlencode({"op": "set_input", "value": command, "taskname": taskname}))).read()
|
|
|
+ data = urlencode({"op": "set_input", "value": command, "taskname": taskname})
|
|
|
+ urlopen(Request(address, data.encode(qgit))).read()
|