summaryrefslogtreecommitdiffstats
path: root/Lib/logging/handlers.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2011-04-28 11:04:58 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2011-04-28 11:04:58 (GMT)
commit7fe1d51924b2863fb2d47eab73ee09932c02f50f (patch)
tree99e9ebd980438cbfcdcb278041ff120e7e984b22 /Lib/logging/handlers.py
parente812bf7bf6b7c1826b5e2c2488176a93cc6968bc (diff)
downloadcpython-7fe1d51924b2863fb2d47eab73ee09932c02f50f.zip
cpython-7fe1d51924b2863fb2d47eab73ee09932c02f50f.tar.gz
cpython-7fe1d51924b2863fb2d47eab73ee09932c02f50f.tar.bz2
Improved test_logging coverage.
Diffstat (limited to 'Lib/logging/handlers.py')
-rw-r--r--Lib/logging/handlers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 322b969..1923d93 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -490,14 +490,14 @@ class SocketHandler(logging.Handler):
try:
if hasattr(self.sock, "sendall"):
self.sock.sendall(s)
- else:
+ else: #pragma: no cover
sentsofar = 0
left = len(s)
while left > 0:
sent = self.sock.send(s[sentsofar:])
sentsofar = sentsofar + sent
left = left - sent
- except socket.error:
+ except socket.error: #pragma: no cover
self.sock.close()
self.sock = None # so we can call createSocket next time