commit 603caf228ff4df93aab6d63d35bf512f8d601975
parent 7abbf329b665c76ed8c46ffc474b85b19e57ab48
Author: ThomasV <thomasv@gitorious>
Date: Sat, 26 Jul 2014 13:04:02 +0200
call json.dump on request
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/network_proxy.py b/lib/network_proxy.py
@@ -135,13 +135,13 @@ class NetworkProxy(threading.Thread):
ids = []
for m in messages:
method, params = m
- request = json.dumps( { 'id':self.message_id, 'method':method, 'params':params } )
+ request = { 'id':self.message_id, 'method':method, 'params':params }
self.unanswered_requests[self.message_id] = method, params, callback
ids.append(self.message_id)
if self.debug:
print_error("-->", request)
self.message_id += 1
- out += request + '\n'
+ out += json.dumps(request) + '\n'
while out:
sent = self.socket.send( out )
out = out[sent:]