]> jfr.im git - z_archive/twitter.git/commitdiff
Deal with SSL errno2 in timetout mode
authorDennis Kanygin <redacted>
Tue, 24 Sep 2013 18:22:34 +0000 (11:22 -0700)
committerDennis Kanygin <redacted>
Tue, 24 Sep 2013 18:22:34 +0000 (11:22 -0700)
twitter/stream.py

index 5ade0e5ca6ac788fd779a09683ea7aa8c2e76077..b173eb31ba8bb8f7aaa945e9852a4be7a58c0115 100644 (file)
@@ -59,7 +59,7 @@ class TwitterJSONIter(object):
                 else:
                     self.buf += sock.recv(1024)
             except SSLError as e:
-                if (not self.block) and (e.errno == 2) or self.timeout:
+                if ((not self.block) and (e.errno == 2)) or ((self.timeout) and (e.errno == 2)):
                     # Apparently this means there was nothing in the socket buf
                     pass
                 else: