From 5492e1722af1ce85b8248e30cf35e957429d161d Mon Sep 17 00:00:00 2001
From: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Date: Mon, 11 Dec 2006 14:07:16 +0000
Subject: Patch by Jeremy Katz (SF #1609407)

---
 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 3552950..4ef896e 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
 
-- 
cgit v0.12

