diff -r 73d5e6101e52 -r 02a05efd58d0 Lib/logging/config.py --- a/Lib/logging/config.py Fri Feb 07 14:58:06 2014 -0800 +++ b/Lib/logging/config.py Mon Feb 10 15:20:13 2014 -0800 @@ -24,8 +24,15 @@ To use, simply 'import logging' and log away! """ -import sys, logging, logging.handlers, socket, struct, traceback, re +import errno import io +import sys +import logging +import logging.handlers +import re +import socket +import struct +import traceback try: import _thread as thread @@ -37,12 +44,7 @@ DEFAULT_LOGGING_CONFIG_PORT = 9030 - -if sys.platform == "win32": - RESET_ERROR = 10054 #WSAECONNRESET -else: - import errno - RESET_ERROR = errno.ECONNRESET +RESET_ERROR = errno.ECONNRESET # # The following code implements a socket listener for on-the-fly @@ -868,12 +870,8 @@ if self.server.ready: self.server.ready.set() except OSError as e: - if not isinstance(e.args, tuple): + if e.errno != RESET_ERROR: raise - else: - errcode = e.args[0] - if errcode != RESET_ERROR: - raise class ConfigSocketReceiver(ThreadingTCPServer): """