summaryrefslogtreecommitdiffstats
path: root/gui/muxconfig.py
diff options
context:
space:
mode:
authorYoann QUERET <yoann@queret.net>2015-10-02 16:48:59 +0200
committerYoann QUERET <yoann@queret.net>2015-10-02 16:48:59 +0200
commit99e95b71ad1f389ff041ede3eae3009c9993a419 (patch)
tree9c9593c12e5ea08eb7de21697e9df35b89bb0fb3 /gui/muxconfig.py
parent845af2d9c4abb7669594444d293b3c7072b1e161 (diff)
downloaddabmux-99e95b71ad1f389ff041ede3eae3009c9993a419.tar.gz
dabmux-99e95b71ad1f389ff041ede3eae3009c9993a419.tar.bz2
dabmux-99e95b71ad1f389ff041ede3eae3009c9993a419.zip
Use space indentation insted tab
Diffstat (limited to 'gui/muxconfig.py')
-rw-r--r--gui/muxconfig.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/gui/muxconfig.py b/gui/muxconfig.py
index 62f182f..3888a6c 100644
--- a/gui/muxconfig.py
+++ b/gui/muxconfig.py
@@ -28,7 +28,7 @@ class General(object):
def __init__(self, pt):
ptree = pt['general']
for fieldname in [
- "nbframes",
+ "nbframes",
"statsserverport",
"writescca",
"tist",
@@ -46,7 +46,7 @@ class Service(object):
self.name = name
for fieldname in [
- "id",
+ "id",
"label",
"shortlabel",
"pty",
@@ -61,7 +61,7 @@ class Subchannel(object):
def __init__(self, name, ptree):
self.name = name
for fieldname in [
- "type",
+ "type",
"inputfile",
"zmq-buffer",
"zmq-prebuffering",
@@ -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)
-
- # 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")
+ 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")
def load(self):
"""Load the configuration from the multiplexer and save it locally"""