diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-04-28 11:04:58 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2011-04-28 11:04:58 (GMT) |
commit | 7fe1d51924b2863fb2d47eab73ee09932c02f50f (patch) | |
tree | 99e9ebd980438cbfcdcb278041ff120e7e984b22 /Lib/logging/handlers.py | |
parent | e812bf7bf6b7c1826b5e2c2488176a93cc6968bc (diff) | |
download | cpython-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.py | 4 |
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 |