From 8db3050d45d3f1008b9011d3cac7d371b53b3a85 Mon Sep 17 00:00:00 2001 From: Yoann QUERET Date: Fri, 2 Oct 2015 17:13:51 +0200 Subject: indentation --- gui/muxconfig.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gui/muxconfig.py b/gui/muxconfig.py index 3888a6c..35587f4 100644 --- a/gui/muxconfig.py +++ b/gui/muxconfig.py @@ -106,22 +106,22 @@ class ConfigurationHandler(object): #self.sock.connect("tcp://{}:{}".format(self._host, self._port)) def zRead(self, key): - self._ctx = zmq.Context() + self._ctx = zmq.Context() self.sock = zmq.Socket(self._ctx, zmq.REQ) self.sock.setsockopt(zmq.LINGER, 0) self.sock.connect("tcp://{}:{}".format(self._host, self._port)) - self.sock.send(key) + self.sock.send(key) - # use poll for timeouts: - poller = zmq.Poller() - poller.register(self.sock, zmq.POLLIN) - if poller.poll(5*1000): # 5s timeout in milliseconds - recv = self.sock.recv() - self.sock.close() - self._ctx.term() - return recv - else: - raise IOError("Timeout processing ZMQ request") + # use poll for timeouts: + poller = zmq.Poller() + poller.register(self.sock, zmq.POLLIN) + if poller.poll(5*1000): # 5s timeout in milliseconds + recv = self.sock.recv() + self.sock.close() + self._ctx.term() + return recv + else: + raise IOError("Timeout processing ZMQ request") def load(self): """Load the configuration from the multiplexer and save it locally""" -- cgit v1.2.3