From 977061142dc2a71d8a23ad18b3676d8240d9b757 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 8 Jan 2007 10:11:58 +0000 Subject: [PATCH] Backported change from trunk: Made SysLogHandler more resilient in the face of syslogd failures. --- Lib/logging/handlers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py index 35529501a72..4ef896ed5d6 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