From 695aebaa803d720453478687116941ddc0fc0c17 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Thu, 27 Aug 2015 15:12:54 +0900 Subject: [PATCH] Clean up imports; use self.print_error --- lib/network_proxy.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/network_proxy.py b/lib/network_proxy.py index d440ff99c..52eff00c1 100644 --- a/lib/network_proxy.py +++ b/lib/network_proxy.py @@ -22,11 +22,8 @@ import threading import Queue import util -from network import Network -from util import print_error +from network import Network, serialize_proxy, serialize_server from simple_config import SimpleConfig -from network import serialize_proxy, serialize_server - class NetworkProxy(util.DaemonThread): @@ -87,7 +84,7 @@ class NetworkProxy(util.DaemonThread): def process(self, response): if self.debug: - print_error("<--", response) + self.print_error("<--", response) if response.get('method') == 'network.status': key, value = response.get('params') @@ -124,11 +121,12 @@ class NetworkProxy(util.DaemonThread): callback = k break else: - print_error( "received unexpected notification", method, params) + self.print_error("received unexpected notification", + method, params) return - - r = {'method':method, 'params':params, 'result':result, 'id':msg_id, 'error':error} + r = {'method':method, 'params':params, 'result':result, + 'id':msg_id, 'error':error} callback(r) @@ -159,7 +157,7 @@ class NetworkProxy(util.DaemonThread): ids.append(self.message_id) requests.append(request) if self.debug: - print_error("-->", request) + self.print_error("-->", request) self.message_id += 1 self.pipe.send_all(requests)