diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-04-03 10:01:44 (GMT) |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2013-04-03 10:01:44 (GMT) |
commit | 06d0c1e72cfe1ab99e9c9a4e9142254dc25febc6 (patch) | |
tree | 6fb19f2cd90701f5d16483aafaf5377b61bbf574 /Lib | |
parent | 1be94cea0fbf779439e415b3ab1e61e390302ab7 (diff) | |
download | cpython-06d0c1e72cfe1ab99e9c9a4e9142254dc25febc6.zip cpython-06d0c1e72cfe1ab99e9c9a4e9142254dc25febc6.tar.gz cpython-06d0c1e72cfe1ab99e9c9a4e9142254dc25febc6.tar.bz2 |
remove uneffective 'while True' clause
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/ssl.py | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -420,18 +420,17 @@ class SSLSocket(socket): raise ValueError( "non-zero flags not allowed in calls to send() on %s" % self.__class__) - while True: - try: - v = self._sslobj.write(data) - except SSLError as x: - if x.args[0] == SSL_ERROR_WANT_READ: - return 0 - elif x.args[0] == SSL_ERROR_WANT_WRITE: - return 0 - else: - raise + try: + v = self._sslobj.write(data) + except SSLError as x: + if x.args[0] == SSL_ERROR_WANT_READ: + return 0 + elif x.args[0] == SSL_ERROR_WANT_WRITE: + return 0 else: - return v + raise + else: + return v else: return socket.send(self, data, flags) |