Skip to content

Commit 4e1f101

Browse files
committed
formatting, comments
1 parent 5af5b6a commit 4e1f101

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

cheroot/makefile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def write(self, b):
3636
self._flush_unlocked()
3737
return len(b)
3838

39-
def _safe_call(self, is_reader, call, *args, **kwargs): # noqa: C901
39+
def _safe_call(self, is_reader, call, *args, **kwargs):
4040
"""Call the supplied callable with retries, as needed.
4141
4242
Method to be overridden in subclasses/mix-ins.
@@ -50,7 +50,7 @@ def _flush_unlocked(self):
5050
# ssl sockets only except 'bytes', not bytearrays
5151
# so perhaps we should conditionally wrap this for perf?
5252
n = self._safe_call(
53-
False, self.raw.write, bytes(self._write_buf)
53+
False, self.raw.write, bytes(self._write_buf),
5454
)
5555
except io.BlockingIOError as e:
5656
n = e.characters_written

cheroot/ssl/pyopenssl.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,13 @@ def sendall(self, *args, **kwargs):
162162
"""Send whole message to the socket.
163163
164164
Not supported due to https://github.com/pyca/pyopenssl/issues/176.
165+
Until that bug is fixed, sendall() may throw SSL.WantWriteError, but
166+
there is no correct way to retry the call because we don't know how
167+
many bytes were already transmitted. We could work around this by
168+
reimplementing sendall() using send(), but we don't actually use
169+
sendall() anywhere.
165170
"""
166-
raise NotImplementedError(
167-
'sendall() not supported on pyOpenSSL due to issue #176'
168-
)
171+
raise NotImplementedError('sendall() is unsupported by pyOpenSSL')
169172

170173
def send(self, *args, **kwargs):
171174
"""Send some part of message to the socket."""

0 commit comments

Comments
 (0)