Mercurial > code > home > repos > homeauto
diff service/reasoning/twisted_sse_demo/sse_client.py @ 316:02d9915b3bbb
patchsource accept much longer lines from sse_collector
Ignore-this: 712d52cecf99c82afffc1ab6b58a5b4f
author | drewp@bigasterisk.com |
---|---|
date | Fri, 25 Nov 2016 17:56:26 -0800 |
parents | 14ac4a210dbc |
children | 1d562167868c |
line wrap: on
line diff
--- a/service/reasoning/twisted_sse_demo/sse_client.py Wed Oct 12 18:37:41 2016 -0700 +++ b/service/reasoning/twisted_sse_demo/sse_client.py Fri Nov 25 17:56:26 2016 -0800 @@ -3,12 +3,17 @@ class EventSourceProtocol(LineReceiver): def __init__(self): + self.MAX_LENGTH = 16384 * 8 self.callbacks = {} self.finished = None # Initialize the event and data buffers self.event = 'message' self.data = '' + def lineLengthExceeded(self, line): + print "line too long" + raise NotImplementedError + def setFinishedDeferred(self, d): self.finished = d