summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2013-04-03 10:01:44 (GMT)
committerGiampaolo Rodola' <g.rodola@gmail.com>2013-04-03 10:01:44 (GMT)
commit06d0c1e72cfe1ab99e9c9a4e9142254dc25febc6 (patch)
tree6fb19f2cd90701f5d16483aafaf5377b61bbf574 /Lib
parent1be94cea0fbf779439e415b3ab1e61e390302ab7 (diff)
downloadcpython-06d0c1e72cfe1ab99e9c9a4e9142254dc25febc6.zip
cpython-06d0c1e72cfe1ab99e9c9a4e9142254dc25febc6.tar.gz
cpython-06d0c1e72cfe1ab99e9c9a4e9142254dc25febc6.tar.bz2
remove uneffective 'while True' clause
Diffstat (limited to 'Lib')
-rw-r--r--Lib/ssl.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 021ae35..dc43db7 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -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)