Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 66db06d

Browse filesBrowse files
committed
Run make pull_chunked and make sync_chunked.
This makes us compatible with Python < 2.7.9 again.
1 parent ff7a57d commit 66db06d
Copy full SHA for 66db06d

File tree

Expand file treeCollapse file tree

2 files changed

+12
-9
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-9
lines changed

‎plotly/plotly/chunked_requests/chunked_request.py

Copy file name to clipboardExpand all lines: plotly/plotly/chunked_requests/chunked_request.py
+11-8Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from six.moves import http_client
55
from six.moves.urllib.parse import urlparse
6-
from ssl import SSLWantReadError
6+
from ssl import SSLError
77

88

99
class Stream:
@@ -254,13 +254,16 @@ def _isconnected(self):
254254
# let's just assume that we're still connected and
255255
# hopefully recieve some data on the next try.
256256
return True
257-
elif isinstance(e, SSLWantReadError):
258-
# From: https://docs.python.org/3/library/ssl.html
259-
# This is raised when trying to read or write data, but more
260-
# data needs to be received on the underlying TCP transport
261-
# before the request can be fulfilled. The socket is still
262-
# connected to the server in this case.
263-
return True
257+
elif isinstance(e, SSLError):
258+
if e.errno == 2:
259+
# errno 2 occurs when trying to read or write data, but more
260+
# data needs to be received on the underlying TCP transport
261+
# before the request can be fulfilled.
262+
#
263+
# Python 2.7.9+ and Python 3.3+ give this its own exception,
264+
# SSLWantReadError
265+
return True
266+
raise e
264267
else:
265268
# Unknown scenario
266269
raise e

‎submodules/chunked_requests

Copy file name to clipboard

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.