]> jfr.im git - z_archive/twitter.git/commitdiff
Cosmetic edits.
authorAndrew W. Donoho <redacted>
Fri, 24 Jan 2014 15:44:19 +0000 (09:44 -0600)
committerAndrew W. Donoho <redacted>
Fri, 24 Jan 2014 15:44:19 +0000 (09:44 -0600)
twitter/stream.py

index 10af6532d5c380d2f8824773298a8f0e82f9c706..41124dd145ca1e7d914047fd0720b94ed7ec82e6 100644 (file)
@@ -28,11 +28,10 @@ class TwitterJSONIter(object):
     def recv_chunk(self, sock):
         buf = sock.recv(32)
         if buf:
-            # Find the HTTP chunk size.
-            crlf = buf.find(b'\r\n')
+            crlf = buf.find(b'\r\n')  # Find the HTTP chunk size.
             if crlf > 0:
                 remaining = int(buf[:crlf].decode(), 16)  # Decode the chunk size.
-                chunk = bytearray(buf[crlf + 2:])  # Add the length of the length header CRLF pair.
+                chunk = bytearray(buf[crlf + 2:])  # Create the chunk buffer.
                 remaining -= len(chunk)
 
                 while remaining > 0: