aboutsummaryrefslogtreecommitdiffstats
path: root/termcast.py
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-17 12:59:30 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-17 12:59:30 -0400
commit4c3c6bf163b1b26fa883e724463dafa8ccbbdd0d (patch)
tree64ae6d125a8d7c06fa6555201dcccfa436b354a2 /termcast.py
parent95d3a2ef4001473aa382eafea2ed00a066973c11 (diff)
downloadpython-termcast-server-4c3c6bf163b1b26fa883e724463dafa8ccbbdd0d.tar.gz
python-termcast-server-4c3c6bf163b1b26fa883e724463dafa8ccbbdd0d.zip
reformatting
Diffstat (limited to 'termcast.py')
-rw-r--r--termcast.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/termcast.py b/termcast.py
index 3363365..a8b47b1 100644
--- a/termcast.py
+++ b/termcast.py
@@ -129,7 +129,9 @@ class Connection(object):
buf = buf[len(m.group(0)):]
if "geometry" in extra_data:
- self.handler = Handler(extra_data["geometry"][1], extra_data["geometry"][0])
+ self.handler = Handler(
+ extra_data["geometry"][1], extra_data["geometry"][0]
+ )
else:
self.handler = Handler(24, 80)
@@ -137,7 +139,9 @@ class Connection(object):
while True:
buf = self.client.recv(1024)
if len(buf) > 0:
- self.publisher.notify("new_data", self.connection_id, self.handler.buf, buf)
+ self.publisher.notify(
+ "new_data", self.connection_id, self.handler.buf, buf
+ )
self.handler.process(buf)
else:
return
@@ -146,7 +150,9 @@ class Connection(object):
if connection_id != self.connection_id:
return
self.viewers += 1
- self.publisher.notify("new_data", self.connection_id, self.handler.buf, b'')
+ self.publisher.notify(
+ "new_data", self.connection_id, self.handler.buf, b''
+ )
self.client.send(b"msg watcher connected\n")
def msg_viewer_disconnect(self, connection_id):