summaryrefslogtreecommitdiffstats
path: root/Lib/logging/handlers.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-10-09 07:23:06 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-10-09 07:23:06 (GMT)
commit6978d58e18101e1169fedbaab13c544b65745a7c (patch)
treea340f389163344558d12c4e9d9e7fa84ae2fe716 /Lib/logging/handlers.py
parent8cf4eb1463217095e9276c0caacfb2df9372504f (diff)
parent7903df4125186c050f7b04990cd367d9fa485603 (diff)
downloadcpython-6978d58e18101e1169fedbaab13c544b65745a7c.zip
cpython-6978d58e18101e1169fedbaab13c544b65745a7c.tar.gz
cpython-6978d58e18101e1169fedbaab13c544b65745a7c.tar.bz2
Closes #16168: Merged SysLogHandler update from 3.3.
Diffstat (limited to 'Lib/logging/handlers.py')
-rw-r--r--Lib/logging/handlers.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 5169af0..2c5a634 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -790,18 +790,12 @@ class SysLogHandler(logging.Handler):
self.formatter = None
def _connect_unixsocket(self, address):
- self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
- # syslog may require either DGRAM or STREAM sockets
+ self.socket = socket.socket(socket.AF_UNIX, self.socktype)
try:
self.socket.connect(address)
except socket.error:
self.socket.close()
- self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
- try:
- self.socket.connect(address)
- except socket.error:
- self.socket.close()
- raise
+ raise
def encodePriority(self, facility, priority):
"""