summaryrefslogtreecommitdiffstats
path: root/gui/muxconfig.py
diff options
context:
space:
mode:
authorYoann QUERET <yoann@queret.net>2015-10-02 17:13:51 +0200
committerYoann QUERET <yoann@queret.net>2015-10-02 17:13:51 +0200
commit8db3050d45d3f1008b9011d3cac7d371b53b3a85 (patch)
tree5931e0e78432fe750bf22d76f718d7232e9f9c4a /gui/muxconfig.py
parent99e95b71ad1f389ff041ede3eae3009c9993a419 (diff)
downloaddabmux-8db3050d45d3f1008b9011d3cac7d371b53b3a85.tar.gz
dabmux-8db3050d45d3f1008b9011d3cac7d371b53b3a85.tar.bz2
dabmux-8db3050d45d3f1008b9011d3cac7d371b53b3a85.zip
indentation
Diffstat (limited to 'gui/muxconfig.py')
-rw-r--r--gui/muxconfig.py24
1 files 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"""