# HG changeset patch # User drewp@bigasterisk.com # Date 1555649899 25200 # Node ID 3d51d4b63497b3aa5f9f89c7e6a74b08501bf014 # Parent 346b85a9adbbde523ddfc486fc1b060a6c51b0e8 patchsource py3 support. might break py2 Ignore-this: e7559afeb74ffa53bf2085f78455014 diff -r 346b85a9adbb -r 3d51d4b63497 lib/cycloneerr.py --- a/lib/cycloneerr.py Thu Apr 18 16:55:52 2019 -0700 +++ b/lib/cycloneerr.py Thu Apr 18 21:58:19 2019 -0700 @@ -1,7 +1,7 @@ try: import httplib except ImportError: - import http.client as httplib + import http.client as httplib # type: ignore import cgi class PrettyErrorHandler(object): diff -r 346b85a9adbb -r 3d51d4b63497 lib/patchsource.py --- a/lib/patchsource.py Thu Apr 18 16:55:52 2019 -0700 +++ b/lib/patchsource.py Thu Apr 18 21:58:19 2019 -0700 @@ -29,7 +29,7 @@ # start with patches self._fullGraphReceived = False self._eventSource = EventSource(url.toPython().encode('utf8')) - self._eventSource.protocol.delimiter = '\n' + self._eventSource.protocol.delimiter = b'\n' self._eventSource.addEventListener('fullGraph', self._onFullGraph) self._eventSource.addEventListener('patch', self._onPatch) diff -r 346b85a9adbb -r 3d51d4b63497 lib/twisted_sse_demo/sse_client.py --- a/lib/twisted_sse_demo/sse_client.py Thu Apr 18 16:55:52 2019 -0700 +++ b/lib/twisted_sse_demo/sse_client.py Thu Apr 18 21:58:19 2019 -0700 @@ -11,8 +11,7 @@ self.data = '' def lineLengthExceeded(self, line): - print "line too long" - raise NotImplementedError + raise NotImplementedError('line too long') def setFinishedDeferred(self, d): self.finished = d