[Python-checkins] cpython (merge 3.5 -> default): Merge 3.5 (asyncio)

yury.selivanov python-checkins at python.org
Wed Aug 5 20:07:46 CEST 2015


https://hg.python.org/cpython/rev/95c0710ed0d9
changeset: 97282:95c0710ed0d9
parent: 97279:8f581da70ccd
parent: 97281:332df8e8d244
user: Yury Selivanov <yselivanov at sprymix.com>
date: Wed Aug 05 14:06:53 2015 -0400
summary:
 Merge 3.5 (asyncio)
files:
 Lib/asyncio/sslproto.py | 7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -613,7 +613,8 @@
 if data:
 ssldata, offset = self._sslpipe.feed_appdata(data, offset)
 elif offset:
- ssldata = self._sslpipe.do_handshake(self._on_handshake_complete)
+ ssldata = self._sslpipe.do_handshake(
+ self._on_handshake_complete)
 offset = 1
 else:
 ssldata = self._sslpipe.shutdown(self._finalize)
@@ -637,9 +638,13 @@
 self._write_buffer_size -= len(data)
 except BaseException as exc:
 if self._in_handshake:
+ # BaseExceptions will be re-raised in _on_handshake_complete.
 self._on_handshake_complete(exc)
 else:
 self._fatal_error(exc, 'Fatal error on SSL transport')
+ if not isinstance(exc, Exception):
+ # BaseException
+ raise
 
 def _fatal_error(self, exc, message='Fatal error on transport'):
 # Should be called from exception handler only.
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /