From: Vinay Sajip Date: Mon, 8 Jan 2007 10:11:58 +0000 (+0000) Subject: Backported change from trunk: X-Git-Tag: v2.5.1c1~180 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=977061142dc2a71d8a23ad18b3676d8240d9b757;p=thirdparty%2FPython%2Fcpython.git Backported change from trunk: Made SysLogHandler more resilient in the face of syslogd failures. --- diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 35529501a728..4ef896ed5d6c 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -586,11 +586,11 @@ class SysLogHandler(logging.Handler): self.address = address self.facility = facility if type(address) == types.StringType: - self._connect_unixsocket(address) self.unixsocket = 1 + self._connect_unixsocket(address) else: - self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.unixsocket = 0 + self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.formatter = None